Re: CountDown Access 97

From: PC Datasheet (nospam_at_nospam.spam)
Date: 03/24/05


Date: Thu, 24 Mar 2005 00:04:47 GMT


>From my file (see below my Sig) ------

--
                                        PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
                              resource@pcdatasheet.com
                                 www.pcdatasheet.com
Countdown Timer On A Form
Q I would like to have a form that once opened would start to countdown for
lets say 30 seconds. Once it reaches 0, some event will occur. I would like
the numbers to change every second so that the user knows how long before
the event occurs. Any ideas on how to do this.
A Add the following code to the form:
Put this statement in the Options Explicit header:
Dim mintTimer As Integer
Private Sub Form_Load()
mintTimer = 30 ' 30 seconds
txtShowTimer.Value = mintTimerStart ' show the time in a textbox
TimerInterval = 1000 ' 1 second
End Sub
Private Sub Timer()
mintTimer = mintTimer - 1 ' count down
txtShowTimer.Value = mintTimerStart ' show the time in a textbox
If mintTimer = 0 Then
'do your event.
TimerInterval = 0 ' Stop the timer
End If
End Sub
"Franco Davillo via AccessMonster.com" <forum@AccessMonster.com> wrote in
message news:a5b89027b44f4e68be3c629d0470cce7@AccessMonster.com...
> Do you kindly know some working example? (a link where i can find it?)
> Thx in advance
>
> --
> Message posted via http://www.accessmonster.com


Relevant Pages

  • Re: do pop up boxes stop all events?
    ... You can "get out of there" in just a few microseconds and the next event will still not occur on the next 10 millisecond interval on most machines. ... The fact is that the underlying sytem which triggers the VB Timer does not really get a very high priority and the OS doesn't really consider such timings to be important. ... Private Declare Function timeBeginPeriod _ ... Private Sub Form_Unload ...
    (microsoft.public.vb.general.discussion)
  • RE: Timer updated on form
    ... Since we need to keep the timer running while the form is ... is in progress and we update the time display; ... I don't see two Private Sub From_Timerevents. ... This variable will tell the Timer event to update the time display ...
    (microsoft.public.access.formscoding)
  • Re: Multiple Timer Advice
    ... user only talks on the phone for 10 minutes so once done, the timer can be ... > Private Const NumOfPhones As Long = 10 ... > Dim OldCaption As String ... > Private Sub ColorButton ...
    (microsoft.public.vb.general.discussion)
  • Re: VB6 (formless) Timer class
    ... Simlarly, you only need to use one from, with one timer, to manage all your ... work in the VB IDE is a red herring, all you really want is the final program.... ... Private Sub Command1_Click ... When you enter a routine, you stay in that routine until it completes. ...
    (microsoft.public.vb.general.discussion)
  • Re: Multiple Timer Advice
    ... We have a Rec Center where we have 20 computers and 10 IP ... > starts a countdown timer and when the timer ... Private Const NumOfPhones As Long = 10 ... Private Sub ColorButton ...
    (microsoft.public.vb.general.discussion)