Timer Event

A

Antonio

Hello, all...I have a form_timer event that looks like
this:
lblLocalTime.Caption = Time
lblLocalTime.Caption = DateAdd("h", [txtHoursDiff], Time())

now, when I add a new customer, I would need to stop the
timer event to allow me to enter the data. Any idea?
 
A

Antonio

Thank you, Helen.

Antonio
-----Original Message-----
In the form's BeforeInsert event, disable the timer by
setting the interval to 0. Then in the AfterUpdate event,
enable it again by setting the interval back to what it
was.

Example:

Private Sub Form_AfterUpdate()

Me.TimerInterval = 500

End Sub

Private Sub Form_BeforeInsert(Cancel As Integer)

Me.TimerInterval = 0

End Sub

Hope this helps
Helen


-----Original Message-----
Hello, all...I have a form_timer event that looks like
this:
lblLocalTime.Caption = Time
lblLocalTime.Caption = DateAdd("h", [txtHoursDiff], Time ())

now, when I add a new customer, I would need to stop the
timer event to allow me to enter the data. Any idea?
.
.
 

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

Top