button control

mkelly

Registered User.
Local time
Yesterday, 21:56
Joined
Apr 10, 2002
Messages
213
I am tryint to use a button "when it is clicked" it will enter the Time() into a text field.

This is the code I am using but when I click the button nothing happens. any suggestions?

Any help greatly appriciated

Private Sub time_in_Button_Click()
txttime_in.text = time()
txttime_in.Enabled = False
txttime_in.Locked = True
End Sub

:confused:
 
I just tried this and it worked fine - try repairing the database to see if there is something wrong.

Code:
Private Sub time_in_Button_Click() 
   txttime_in = Time 
   txttime_in.Enabled = False 
   txttime_in.Locked = True 
End Sub
 
I have done this before.

But I created a macro using SETVALUE and enter

ITEM: forms![yourfornname]![yourtext box]

EXPRESSION: Time()

then set the macro on the onclick event of the command button.

This should work

Hope it helps

Andy
 

Users who are viewing this thread

Back
Top Bottom