Link to home
Start Free TrialLog in
Avatar of jjc9809

asked on

Another Access 2007 Question on Timers

Hi Everyone,

I have an Access 2007 application where I have a form called a "CoverSheet" that loads.
I have a Label on the form that flashes in Red with a Timer on the load event set to an interval "500".  The Message that flashes is "Check for New Stores or changes to stores".

However I want this flashining to cease after about 2 minutes and not flash any longer.
What is the coding to do this or property to do this?  I just do not want the flashing to continue all of the time.  When the user sees it, I want it turned off and not just keep flashing, becuase the user will come back to this coversheet for other things and the coversheet remains open while the application is running.

Avatar of mbizup
Flag of Kazakhstan image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could add a static variable to be used as a counter in your OnTimer event and increment it each time.  Once the counter gets to 120, which is equivalent to 2 minutes with the interval set to 500, you would set your TimerInterval to 0.  This solution is only good if your timer event is not used for any other purpose.

Static cnt as Integer

cnt = cnt +1
If cnt = 120 then
     Me.TimerInterval = 0
     cnt = 0
End If

You could add an OnClick event to your flashing label to set the TimerInterval to 0.

Just curious.  Couldn't your program check for new stores or changes to stores and then inform the user that this is the case?  Or is that information not in tables?
Avatar of jjc9809


This works great!