Time

mis

Registered User.
Local time
Today, 10:23
Joined
Dec 15, 2003
Messages
55
Hello,

I have placed a txtbox that outputs the time, but I would like it to keep the time rather than display the time the form was loaded. Not sure how to achieve this any ideas?
 
You can use the Form's OnTimer event to update the form as often as you need. Look it up in the Access online help.
 
How do u update a form ?? is there a way to update a txt box instead?
 
Access is event-driven. There must be an event that occurs for code to run. Forms have a timer event, text boxes do not. That doesn't mean you have to update the entire form, just that the form has an event that you can set to run periodically. In that event, you can specify an update of the textbox.
How do u update a form ??
You can use the Form's OnTimer event to update the form as often as you need. Look it up in the Access online help.
 
Set the timer to 1 and a event procedure for the form timer

txttime.text = time()

got back an error run time error

can't reference a property or method for a control unless the control has the focus.

So tried

txtTime.SetFocus
txtTime.text = Time()

Then run-time error

can't move the focus to the control txttime

any idears
 
It sounds like you have the textbox Enabled = False

Anyway, don't reference the TEXT property

This will do what you want:
Code:
txtTime = Time

And why are you setting the TimerInterval to 1? That's one millisecond. Are your trying to bring your computer to a standstill? :rolleyes:
 
Help

Now getting Run-time error

You can't assign a value to this object.

Any help

text box enable =true
 

Users who are viewing this thread

Back
Top Bottom