Results 1 to 2 of 2
  1. #1
    rwahdan1978 is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Jun 2024
    Posts
    57

    countdown 2 digits

    Hi

    I have a countdown counter in my form from 30 to 0:

    Code:
            Label2.Visible = True
            Label3.Visible = True
            txtTimer.Visible = True
            Me.Command5.Enabled = True
            Me.txtTimer.Value = Me.txtTimer.Value - 1
            If Me.txtTimer.Value = 0 Then
                DoCmd.OpenQuery "updateAhmad"
            End If
    it is fine and goes from 30 to 0 but when it reaches 9 it is showing as one digit and i want it to show 2 digits.


    instead of 30,29,28...10,9,8,7...
    I want 30,29,28...10,09,08,07...

  2. #2
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,425
    Try Me.txtTimer = Format(Me.txtTimer - 1,"00")
    As long as you don't need to use the value in any sorting or math you should be OK.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. timer countdown
    By DMT Dave in forum Access
    Replies: 1
    Last Post: 06-04-2020, 09:26 AM
  2. Replies: 12
    Last Post: 04-15-2019, 07:28 PM
  3. Replies: 7
    Last Post: 12-23-2015, 01:02 PM
  4. Countdown Date??
    By access2015 in forum Queries
    Replies: 1
    Last Post: 06-17-2015, 03:52 AM
  5. countdown Timer
    By yigitki in forum Programming
    Replies: 16
    Last Post: 11-11-2011, 11:24 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