Display Clock (1 Viewer)

D

dayus

Guest
I am looking for a means to display a clock on a form that keeps time, any sugestions?
 

GMC

Registered User.
Local time
Today, 21:26
Joined
Nov 1, 1999
Messages
10
Try inserting an unbound Text Box onto your form and calling it something like [t_mytime]. Now, on the OnTimer event for the form try inserting the following code:

--------------------------------------------
On error goto err_form_timer
'set the ControlSource for the text box
me![t_mytime] = format(now(),"hh:mm:ss")

exit_form_timer:
exit sub

err_form_timer:
'some error handling here
resume exit_form_timer

============================================
Lastly, set the 'Timer Interval' property of the form so that the the above event occurs every second or so. This will ensure that the clock displays the correct time (try interval=1000).

Hope this helps

Grant

[This message has been edited by GMC (edited 11-02-1999).]
 

Users who are viewing this thread

Top Bottom