Keeping current date on a form

Emma35

Registered User.
Local time
Today, 11:35
Joined
Sep 18, 2012
Messages
497
Hi All.....just a quick question about a date control. If i have a form which stays open for days at a time, is it possible to get the date to change from one day to the next without closing the form ?

Thanks
 
Yes if you use a form timer event to update the control.
If you want to show the time as well set the timer interval to 1000 (1 second) or 60000 (1 minute)
If just the date, use 60000 or possibly a larger interval
 
Ok thank you....how do i do that ?
 
See the attached example that I've just put together.
I've included several different formats - choose whatever format you prefer

attachment.php


Note I've added the refresh code to both Form_Load & Form_Timer events.
If you just use the latter, the date/time value(s) are shown after a short delay when the first timer event kicks in
 

Attachments

  • FormTimer.zip
    FormTimer.zip
    26.8 KB · Views: 93
  • Capture.PNG
    Capture.PNG
    16.8 KB · Views: 258
Thanks again for taking the time to help. Your example was very easy to follow. I'll leave the form open overnight and see if i've put the code in properly

Emma x
 

Users who are viewing this thread

Back
Top Bottom