Results 1 to 4 of 4
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Timer Event Code Stops After First Run

    I have code that makes a label flash and then stops.It works ok but then the stay visible after that and then the code does not fire again when I change to another record and it should fire!

    Here is my code:


    If Me.nextschddte = Date Then

    Static intCounter As Integer
    intCounter = intCounter + 1
    Me.lblLocked.Visible = Not Me.lblLocked.Visible
    If intCounter >= 5 Then
    Me.TimerInterval = 0
    Me.lblLocked.Visible = True
    intCounter = 0
    End If

    End If

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You set the timer interval to 0, which stops it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Yes, I want it to stop but then not show the label but upon moving to the next record fire again if possible!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    So in the current event set the timer interval to something other than 0.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Timer event vs. longrunning line: concurrency issue
    By GlistEngineering in forum Programming
    Replies: 1
    Last Post: 07-25-2012, 05:40 PM
  2. AfterUpdate event code error?
    By agripa86 in forum Programming
    Replies: 3
    Last Post: 08-12-2011, 09:12 AM
  3. Timer Event - Why does this happen
    By Rhino373 in forum Programming
    Replies: 2
    Last Post: 05-26-2011, 07:18 PM
  4. Replies: 2
    Last Post: 11-30-2010, 10:06 AM
  5. How to put code in form event.
    By rogdawg in forum Forms
    Replies: 4
    Last Post: 08-06-2010, 03:38 PM

Tags for this Thread

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