Tony Septav
iggy at nanaimo.ark.com
Thu Sep 11 09:44:53 CDT 2008
Hey All I am trying to trigger an event when the current time = the calculated time. I have been fiddling with this, as previous versions would trip up every so often (ie. after 28 hours). The current version has been running for 3 days and everything seems to be working fine, just wanted to check with the time experts if I am doing this correctly. Me!BTime - unbound on form Timer = 1000 Private Sub Form_Open(Cancel As Integer) Me!Btime = cstr(Format(TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 5), "long time")) End Sub Private Sub Form_Timer() If cstr(Format(TimeSerial(Hour(Now()), Minute(Now()), Second(Now())), "long time"))> cstr(Format(TimeSerial(Hour(me!BTime), Minute(me!BTime), Second(Me!Btime)), "long time")) Then Me!BTime = cstr(Format(TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 5), "long time")) End If End Sub