MelMiddleton
Oct 30 2011, 07:37 PM
I have a command button I created with On click focus expression reads:
Private Sub Command27_Click()
Me!TimeIn = Now()
End Sub
But when I click it, nothing happens? What am I doing wrong?
Aquadevel
Oct 30 2011, 07:40 PM
What is the control on the form to hold the time?
MelMiddleton
Oct 30 2011, 07:49 PM
I have a text box linked to my time card table. Text box is named LbTimeIN
Tinkering with the code it now says
Private Sub CmdTimeIN_Click()
Me.TimeIn = Now()
End Sub
arul
Oct 30 2011, 08:23 PM
It works fine for me...
Private Sub Command0_Click()
Me.TimeIn = Now()
Form_test.TimerInterval = 1000
End Sub
Private Sub Form_Timer()
Me.TimeIn = Now()
Form_test.TimerInterval = 1000
End Sub
MelMiddleton
Oct 30 2011, 09:14 PM
Im confused by the second set of codes?
Private Sub Command0_Click()
Me.TimeIn = Now()
Form_test.TimerInterval = 1000
End Sub
Private Sub Form_Timer()
Me.TimeIn = Now()
Form_test.TimerInterval = 1000
End Sub
I have tried this every way I can think i have no idea why it wont work. . . any help anyone can offer please?
MelMiddleton
Oct 30 2011, 09:18 PM
QUOTE (arul @ Oct 30 2011, 08:23 PM)

It works fine for me...
Private Sub Command0_Click()
Me.TimeIn = Now()
Form_test.TimerInterval = 1000
End Sub
Private Sub Form_Timer()
Me.TimeIn = Now()
Form_test.TimerInterval = 1000
End Sub
------------------------------------------------------
like this?
Private Sub CmdTimeIn_Click()
Me.TimeIn = Now()
FRMInpute = 1000
End Sub
Private Sub FRMInput()
Me.TimeIn = Now()
FRMInpute.TimerInterval = 1000
End Sub
MelMiddleton
Oct 30 2011, 09:23 PM
or this
Private Sub CmdTimeIn_Click()
Me!TimeIn = Now()
FRMInpute.TimeIn = 1000
End Sub
arul
Oct 30 2011, 09:24 PM
Yes.... is it not working ?? I hope I got it right (your issue). Please find the sample database attached.
MelMiddleton
Oct 30 2011, 09:36 PM
Still not working. . . see my attached
arul
Oct 30 2011, 09:39 PM
sorry mate... i have Office 2003 installed on my computer
MelMiddleton
Oct 30 2011, 09:40 PM
I see that I had the code wrong I have it as
Private Sub CmdTimeIn_Click()
Me.TimeIn = Now()
FRMInput.TimerInterval = 1000
End Sub
Private Sub Form_Timer()
Me.TimeIn = Now()
FRMInput.TimerInterval = 1000
End Sub
still a no go
MelMiddleton
Oct 30 2011, 09:43 PM
ok progress, no if I click the button then the text box I get the time?
MelMiddleton
Oct 30 2011, 09:45 PM
I got it! Phew! thank you sooooooo much
arul
Oct 30 2011, 09:48 PM
yes.... on button click the text box shows the current time; keep refreshing every one second to give the updated time.
arul
Oct 30 2011, 09:52 PM
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.