If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
CountDown with format 00:00:00 in access
hi there everyone. I know this topic has been going on for some time
now. but really I need your help. I wish to create a countdown in an access form so that when the timer is up a message box pops up and says time is up. You see I wish the count down to be in hours, minutes and seconds. Something like 00:40:00 and when the countdown starts it goes 00:39:59 and so on. I know how to do it with seconds only but no with this format.Can anyone help me please!!. I really need it for my coursework. An example with a download would be very helpful. Thanks in Advance!!!! |
#2
|
|||
|
|||
CountDown with format 00:00:00 in access
Assuming you've got a text box txtTimer on your form, when you want to start
the timer, set Me.TimerInterval = 1000 Me.txtTimer = Format(#00:40:00#, "hh:nn:ss") For the form's Timer event, put: Private Sub Form_Timer() Dim dtmCurr As Date dtmCurr = CDate(Me.txtTimer) If dtmCurr 0 Then Me.txtTimer = Format(DateAdd("s", -1, dtmCurr), "hh:nn:ss") Else Me.TimerInterval = 0 Me.txtTimer = Null MsgBox "Time's up!" End If End Sub -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) wrote in message ups.com... hi there everyone. I know this topic has been going on for some time now. but really I need your help. I wish to create a countdown in an access form so that when the timer is up a message box pops up and says time is up. You see I wish the count down to be in hours, minutes and seconds. Something like 00:40:00 and when the countdown starts it goes 00:39:59 and so on. I know how to do it with seconds only but no with this format.Can anyone help me please!!. I really need it for my coursework. An example with a download would be very helpful. Thanks in Advance!!!! |
#3
|
|||
|
|||
CountDown with format 00:00:00 in access
Thanks a Lot!!!! man you are great. I don't know how to thank you. I
owe you one. Maybe I will be able to help you another time if you need help. Douglas J. Steele wrote: Assuming you've got a text box txtTimer on your form, when you want to start the timer, set Me.TimerInterval = 1000 Me.txtTimer = Format(#00:40:00#, "hh:nn:ss") For the form's Timer event, put: Private Sub Form_Timer() Dim dtmCurr As Date dtmCurr = CDate(Me.txtTimer) If dtmCurr 0 Then Me.txtTimer = Format(DateAdd("s", -1, dtmCurr), "hh:nn:ss") Else Me.TimerInterval = 0 Me.txtTimer = Null MsgBox "Time's up!" End If End Sub -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) wrote in message ups.com... hi there everyone. I know this topic has been going on for some time now. but really I need your help. I wish to create a countdown in an access form so that when the timer is up a message box pops up and says time is up. You see I wish the count down to be in hours, minutes and seconds. Something like 00:40:00 and when the countdown starts it goes 00:39:59 and so on. I know how to do it with seconds only but no with this format.Can anyone help me please!!. I really need it for my coursework. An example with a download would be very helpful. Thanks in Advance!!!! |
#4
|
|||
|
|||
CountDown with format 00:00:00 in access
Thanks a Lot!!!! man you are great. I don't know how to thank you. I
owe you one. Maybe I will be able to help you another time if you need help. Douglas J. Steele wrote: Assuming you've got a text box txtTimer on your form, when you want to start the timer, set Me.TimerInterval = 1000 Me.txtTimer = Format(#00:40:00#, "hh:nn:ss") For the form's Timer event, put: Private Sub Form_Timer() Dim dtmCurr As Date dtmCurr = CDate(Me.txtTimer) If dtmCurr 0 Then Me.txtTimer = Format(DateAdd("s", -1, dtmCurr), "hh:nn:ss") Else Me.TimerInterval = 0 Me.txtTimer = Null MsgBox "Time's up!" End If End Sub -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) wrote in message ups.com... hi there everyone. I know this topic has been going on for some time now. but really I need your help. I wish to create a countdown in an access form so that when the timer is up a message box pops up and says time is up. You see I wish the count down to be in hours, minutes and seconds. Something like 00:40:00 and when the countdown starts it goes 00:39:59 and so on. I know how to do it with seconds only but no with this format.Can anyone help me please!!. I really need it for my coursework. An example with a download would be very helpful. Thanks in Advance!!!! |
#5
|
|||
|
|||
CountDown with format 00:00:00 in access
|
Thread Tools | |
Display Modes | |
|
|