I would like to put a running timer on my switchboard page in the header to the right of the start page name. I want this clock to mimick the computer clock with a running second count if Possible. Sorry new to Access![]()
I would like to put a running timer on my switchboard page in the header to the right of the start page name. I want this clock to mimick the computer clock with a running second count if Possible. Sorry new to Access![]()
Scooter172
Create a label on your form, I would call it lblClock or lblTime... something you fancy,
Then on the form properties, Set timer interval to 1, then On Timer event add the following code.
[VBA]
Private Sub Form_Timer()
Me!lblClock.Caption = Format(Now, "dddd, mmm d yyyy, hh:mm:ss AMPM")
End Sub
[/VBA]
Someday I'll understand everything...
![]()
![]()
Even then...I'll still pretend I'm a beginner.
I get an error, stating that it is not proper use of Me! statement
Scooter172
Then try Me.lblClock.Caption, see if that works for you.
The one thing I don't like about that is the refreshing seems to be very sporadic... meaning it ticks fine, but occassionaly your screen jumps all over the place.
Perhaps someone else has a better idea, but I haven't quite figured out how to fix both issues at the same time.
Someday I'll understand everything...
![]()
![]()
Even then...I'll still pretend I'm a beginner.
Attachment 4374
Here is a screen shot of how that ended up
Scooter172
[vba]Private Sub Form_Timer()
Me.lblClock.Caption = Format(Now, "dddd, mmm d yyyy, hh:mm:ss AMPM")
End Sub [/vba]
Someday I'll understand everything...
![]()
![]()
Even then...I'll still pretend I'm a beginner.
I have still not had luck making this work.. I have reset timer to 1 and then entered the code in the cell On Timer and I get nothing...Zip Zero Notta!!
Scooter172
I'm not sure what is going wrong.
Are your lables the same as what is being called in the Sub? Are you calling the On_Timer event from the Main form? Or are you trying to call it somewhere else? You mentioned you put the code in the cell... It shouldn't be in a cell. It should be bound to the form's timer. See if this file works any different.
Someday I'll understand everything...
![]()
![]()
Even then...I'll still pretend I'm a beginner.