countdown timer

N

Nick T

Hi,

Have a text box which automatically starts a countdown timer when a form is
opened.
Counts down in seconds.

Can i make it read out in mm:ss?
eg, if it starts at 90seconds, it currently displays '90', however i want it
to display 01:30. (ie. 1minute, 30seconds).

Any suggestions??
 
J

John Spencer

In one control, use
Format(TimeInSeconds\60, "00") & ":" & Format(TimeInSeconds Mod 60,"00")

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
N

Nick T

Hi,
Thanks for that, but could you clarify (bit of a beginner).
My code on my form is:

Private Sub Form_Timer()
If Me.Timer1 = 0 Then
Else
Me.Timer1 = Me.Timer1 - 1
End If

If Me.Timer1 = 0 Then
Me.Text4 = "Check Required"
Me.Text4.BackColor = vbRed
End If


If Me.Timer2 = 0 Then
Else
Me.Timer2 = Me.Timer2 - 1
End If
If Me.Timer2 = 0 Then
Me.Text6 = "Check Required"
Me.Text6.BackColor = vbRed
End If


End Sub

My form timer interval is set to 1000
Thanks for the help.
 

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

Similar Threads

Form Timer 2
Countdown timer on form 4
countdown timer and microsoft powerpoint 3
Adjust my countodwn 4
Countdown Timer on Form 5
Formula not being Friendly 3
Countdown Timer - not stopwatch 9
Countdown timer 1

Top