Countdown Timer (1 Viewer)

Rusty

Registered User.
Local time
Today, 09:23
Joined
Apr 15, 2004
Messages
207
Hey Guys,

I've searched the Forum for this and can't find anything to help what seems to be a simple thing that is eluding me at the moment (that Monday feeling again). :rolleyes:

I need a timer to be displayed on a pop-up form that counts down from 3 seconds to 0 (at 1 second intervals obviously). Is it using an unbound textbox and code on the OnOpen event of the form?

Rusty
:D
 

ghudson

Registered User.
Local time
Today, 04:23
Joined
Jun 8, 2002
Messages
6,195
Check out my CountDown sample for it should get you started...
 

Attachments

  • CountDown.zip
    28.3 KB · Views: 3,050

Rusty

Registered User.
Local time
Today, 09:23
Joined
Apr 15, 2004
Messages
207
Thanks for the help Ghudson.

I did it using the unbound textbox idea and set the value to 3 in the OnOpen event of the form:

Private Sub Form_Open(Cancel As Integer)
Me.txtTimer.value = 3
End Sub


I set the TimerInterval to 1000 and in the OnTimer event I put his code:

Private Sub Form_Timer()
Me.txtTimer.value = Me.txtTimer.value - 1

If Me.txtTimer.value = 0 Then
Application.Quit
Else
End If
End Sub

This runs on a pop up form that now states:
"You have been temporarily removed from the database by the administrator."
"MS Access will close in" ... "seconds"

Simple but effective. I'll go and check out your example now though and see if I can use any of it.

Many thanks,

Rusty
:D
 
Last edited:

Users who are viewing this thread

Top Bottom