countdown in textfield

A

Andy Van Houtte

Hi
I need to make a form in access for a quiz. In a textfield I need a
countdown from 60 to 0(most prefered 60seconds). When the countdown is
finished the form needs to shut down automatically. Can somebody help me
with this.
many thx
 
A

Al Camp

Andy,
Check out the Timer Event and Timer Interval in Help.
You may want to set up a Timer event for every second, update a variable
(initial value = 60) by -1 every second, and when the variable = 0... close
the form.
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
K

Klatuu

You can use the form Timer event to handle this.
In the Load event of the form:
Me.TimerInterval = 1000 'This is one second
Me.txtCountDownTime = 60 'Starts with one minute

Then in the form's Timer event:

Me.txtCountDownTime = Me.txtCountDownTime -1
If Me.txtCountDown = 0 Then
DoCmd.Close acForm, MyFormName, acSaveNo
Endif
 
Top