How To Make An Access Timer

In this video, you’ll find out how to create an MS Access timer.
Timers in MS Access are needed when you want to set a time limit on anwering questions or other tasks.

[sourcecode language=”vb”]

Dim m_intTimer As Integer

Private Sub btnTimer_Click()

Me.TimerInterval = 1000
m_intTimer = 10 ’10 seconds
Me.txtTime.SetFocus
Me.txtTime.Text = m_intTimer
Me.btnTimer.SetFocus

End Sub

Private Sub Form_Timer()

m_intTimer = m_intTimer – 1 ‘ count down
Me.txtTime.Value = m_intTimer ‘ show the time in a textbox
If m_intTimer = 0 Then
‘do your event.
TimerInterval = 0 ‘ Stop the timer
MsgBox "Time is up"
End If
End Sub

[/sourcecode]

You can download the database file, by clicking here.

Free! Subscribe To Our YouTube Channel!

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather
Tags: , ,




 

Call Erik Now