Here you go as promised-
add a label on your form. put this in the caption 03/26:03 PM
paste this at the top of the code page under Option Compare Database
Public format_type As String
Put this in your OnOpen event
format_type = 1
paste this into your form with the clock
Private Sub lblClock_DblClick(Cancel As Integer)
format_type = format_type + 1
If format_type = 4 Then format_type = 1
End Sub
paste this timer event into your form code
Private Sub Form_Timer()
Select Case format_type
Case 1
Me.LblClock.Caption = Format(Now(), "hh:mm:ss")
Case 2
Me.LblClock.Caption = Format(Now(), "hh:mm AMPM")
Case 3
Me.LblClock.Caption = Format(Now(), "hh:mm")
Case Else
Me.LblClock.Caption = Format(Now(), "mm/dd:mm AMPM")
End Select
End Sub
Timer Interval = 1000
thats it.
change your font, colour or whatever you want. this will give you a clock that changes every second.
regs,
Nigel