dayus
10-30-1999, 06:27 AM
I am looking for a means to display a clock on a form that keeps time, any sugestions?
|
View Full Version : Display Clock dayus 10-30-1999, 06:27 AM I am looking for a means to display a clock on a form that keeps time, any sugestions? GMC 11-01-1999, 06:11 AM 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).] |