Timer Event

  • Thread starter Thread starter Antonio
  • Start date Start date
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?
 
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?
.
.
 
Back
Top