Jul 15, 2004 #1 ocan Programmer Jun 28, 2004 31 US I have a main menu in a program & in the control source for a text box is =Format(Now(),"dddd"", ""mmm d yyyy"", ""hh:nn:ss ampm") but it only keeps the day/time for when the form is opened. how could i keep it synchronized with the computer clock. thanks.
I have a main menu in a program & in the control source for a text box is =Format(Now(),"dddd"", ""mmm d yyyy"", ""hh:nn:ss ampm") but it only keeps the day/time for when the form is opened. how could i keep it synchronized with the computer clock. thanks.
Jul 15, 2004 #2 hymn Technical User Feb 27, 2003 1,036 GB If you are after a clock on your form Put this code in your form's ON LOAD event: Me!lblClock.Caption = Format(Now, "dddd, mmm d, yyyy, hh:mm:ss AMPM") Me.TimerInterval = 1000 Put this code in the TIMER INTERVAL event: Me!lblClock.Caption = Format(Now, "dddd, mmm d, yyyy, hh:mm:ss AMPM") Then, but a label on the form called "lblClock" (without the quotes) and you're done. Borrowed from someone Hope this helps Hymn Upvote 0 Downvote
If you are after a clock on your form Put this code in your form's ON LOAD event: Me!lblClock.Caption = Format(Now, "dddd, mmm d, yyyy, hh:mm:ss AMPM") Me.TimerInterval = 1000 Put this code in the TIMER INTERVAL event: Me!lblClock.Caption = Format(Now, "dddd, mmm d, yyyy, hh:mm:ss AMPM") Then, but a label on the form called "lblClock" (without the quotes) and you're done. Borrowed from someone Hope this helps Hymn
Jul 15, 2004 #4 hymn Technical User Feb 27, 2003 1,036 GB Pleasure Hope this helps Hymn Upvote 0 Downvote