The CLOCK on forms

D

Dragan

Hi.

Do you know how to create the clock on forms in Access?

I create a Label called lblClock on the form and write this code.

Private Sub Form_Timer()
Me!lblClock.Caption = Format(Now, "dddd, mmmm yyyy, hh:mm:ss AMPM")
End Sub

Private Sub cmdClockStart_Click()
Me.TimerInterval = 1000
End Sub

Private Sub cmdClockEnd_Click()
Me.TimerInterval = 0
End Sub

These code working but I most always click on the label lblClock.

I just want to the clock with normaly time on the form, no break or no
click.

Thanks
 
D

Dave

try putting the line:
Me.TimerInterval = 1000
in the form load event so that it starts the timer when the form loads.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Time VB 2
Clock or operator error? 2
Dynamic Naming of Form Button 3
Forms Error Timer 3
Timer gettin complicated! 4
Use Stopwatch to trigger event 2
clock 2
Displaying Data Forms in Excel 2016 for Mac 0

Top