Set Time Macro

P

PD

I want to track the time on a record. I created a Click Macro to Set Time()
in a Text Box on my Form. It displays the current time but I get stuck on
that record? I can not move off of that record with out hitting the escape
key. I tried Stop Macro but no luck.
 
M

missinglinq via AccessMonster.com

Problem is you have to keep running the macro constantly for the time to
change. You need to do this in VBA if you want it to work. Here's a hack I
use. In Design View for your form:

You'll need a textbox called txtOmega (yeah, I'm a watch fanatic) and you'll
maybe want to add some cosmetics to it, like a frame around it. If you'd also
like to show the date, add a textbox called txtDayRunner.

Goto your form’s property box. Under the Event Tab find Timer Interval and
enter 1000.

In the Visual Basic Editor (code behind your form)

Private Sub Form_Open(Cancel As Integer)
'Displays while waiting for timer to crank up
Me.txtOmega = Time
End Sub

Private Sub Form_Timer()
Me.txtOmega = Time 'Display time
Me.txtDayRunner = Date 'Display date
End Sub

Omit the references to txtDayRunner in the Sub Form_Timer if you don't set up
a box for the date.
 
Top