Live time in a form

Skerdi

Registered User.
Local time
Today, 15:49
Joined
Jun 27, 2007
Messages
47
Hi,
Can some1 tell me how to show the actual (live) time in a form? I mean the time in "hh:mm:ss" format but seeing the seconds changing.
Thnx in adv.
 
Now() will return the system date but this is static. You could refresh the form using a timer event, but this is very resource hungry to do every second. What's wrong with the system clock in the task bar?
 
Thanx Neil,
I've done smth in access for a touch screen, there are some big butons and big fonts there and I thought to show the time in the form but in a big font, so it can be readable from a distance.
 
Hi,
Can some1 tell me how to show the actual (live) time in a form? I mean the time in "hh:mm:ss" format but seeing the seconds changing.
Thnx in adv.
Basically, make an unbound textbox with the control source being =time(). Name it MyClock

Then in your database, for database events, set timer interval to 1000, then, on timer build the following event:
Private Sub Form_Timer()
Me.Myclock.Requery
End Sub

As neileg stated, this is very resource intensive. Watch the bottom left.... each second you will see it calculate the time.
 

Users who are viewing this thread

Back
Top Bottom