Timer of Form

D

DontKnow

Hi Guys,

I need help in showing a timer value in a text box as well the user can
still operate a form within the database, whilst the counter is counting down.

I want ot be able to set a variable timer say to 30 seconds and be able to
update text boxes within a form. I don't know if it is possible to update the
form whilst the timer is runnig??

Does anyone have a pre made timer such as this??

many thansk for your help in advance!!

Cheers,
 
J

John W. Vinson

Hi Guys,

I need help in showing a timer value in a text box as well the user can
still operate a form within the database, whilst the counter is counting down.

I want ot be able to set a variable timer say to 30 seconds and be able to
update text boxes within a form. I don't know if it is possible to update the
form whilst the timer is runnig??

Does anyone have a pre made timer such as this??

many thansk for your help in advance!!

Cheers,

A timer is builtin. You can set the form's TimerInterval property to 1000
(milliseconds, one second) and put code in its Timer event to decrement the
value in a textbox. In some appropriate event, set the value of an unbound
textbox txtCountdown to 30 and set TimerInterval to 1000; then in the form's
Timer event put code like

Private Sub Form_Timer()
If Me!txtCountDown > 0 Then
Me!txtCountDown = Me!txtCountDown - 1
Else
<do whatever is appropriate when the sand has run out>
Me.TimerInterval = 0 ' to turn off the timer
End If
End Sub
 
D

DontKnow

Thanks again John!!

I was overcomplicating the whole thing!!

Exactly what I was after!!
 
B

BruceM via AccessMonster.com

You could do something like this in an appropriate event, maybe in a command
button Click event:

Me.txtCountDown = 30
Me.TimerInterval = 1000
Once the timer is completed is it possible to start it again?
[quoted text clipped - 25 lines]
End If
End Sub
 

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