Results 1 to 3 of 3
  1. #1
    Mediaman09 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    2

    Simple 30 second countdown timer on Access 2003 form

    I spent about an hour on Google searching for what I thought was going to be simple. I wanted to create a 30 second contdwon time on a form.



    I thought this would be straghtforward, ie

    - add a textbox to a form
    - name that text box
    - cut and paste some code into the On Load event property.

    I found a few dozen suggestiond on how to do this. Each one, I mean every single one, for one reason or another, would not work. People leave out steps they think are obvious... but they are no obvious to everyone.

    Would someone be good enough to post some code that I coud use to display a countdown timer??

    Many many thanks

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Is this what you are looking for. Not sure exactly what you want.

    http://www.datapigtechnologies.com/f...ashscreen.html

    Alan

  3. #3
    Mediaman09 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    2
    Interesting link, thanks, but not spefcially what I wanted.

    I did ultimately find what I was looking for:

    1) Create a Text Box field on the form and name it txtTimer

    2) Create a Label field on the fortand name it labTimesUp . Type any mesage in the label ,eg "Times Up!

    3) On the Form properties set Timer Interval to 1000

    4) On the Form properties On Timer event, cut and paste this event procedure.

    Code:
     
    Private Sub Form_Timer()
    Me.txtTimer.VALUE = Me.txtTimer.VALUE - 1
    If Me.txtTimer.VALUE = 0 Then
    labTimesUp.Visible = True
    Me.TimerInterval = 0
    Else
    End If
    End Sub
    5) On the Form properties On Open event, cut and paste this event procedure

    Code:
     
    Private Sub Form_Open(Cancel As Integer)
    Me.txtTimer.VALUE = 20
    End Sub

    ... or use Me.txtTimer.VALUE = 30 for a 30 second timer.

    Done.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Pause / Wait / Countdown / Timer
    By DevGreg in forum Programming
    Replies: 2
    Last Post: 07-19-2022, 06:30 AM
  2. Timer routine in Access 2007
    By bcmarshall in forum Access
    Replies: 4
    Last Post: 04-25-2011, 04:23 PM
  3. Replies: 2
    Last Post: 11-30-2010, 10:06 AM
  4. Form opens for only seconds
    By MFS in forum Programming
    Replies: 5
    Last Post: 11-04-2010, 09:33 PM
  5. Automatically close form in 5 seconds
    By alaric01 in forum Forms
    Replies: 4
    Last Post: 09-21-2010, 04:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums