How to create 2 timers

history

Egyptian Pharaoh
Local time
Today, 06:12
Joined
Jan 26, 2008
Messages
190
Hello friends,

How are you, here we're again

I'm asking about how to create 2 timers on the same form

I've a timer to play label with this code :
Code:
Static C
C = C + 1
Me.Label1.fontsize = Abs(C) + 8
If C = 10 Then C = -10
End Sub
and set the timer interval on the form properties to 200

Then I need to put another timer to close with save the current form and open another form.
I need this timer to be every 3 hours.

Any Idea about that ???

Thanks in advance
 
A timer can have as many flags as you want to check. If it is not your 3 hour event then just increment your 3 hour variable until it is.
 
I would set a static varible to Now() when the form first opens and piggyback on your current Timer event to do a DateDiff() between this variable and the current value of Now(), using the minute interval. When the DateDiff() is => 180 minutes you open the secondary form then close the original form.

Linq ;0)>

BTW, Allan, have you got snow up there yet in the High Country?
 
...and set the timer interval on the form properties to 200

Why 200 milliseconds? Do you really need it to fire that often? 1000 milliseconds (or 1 second) isn't enough?
 
Use of the Timer event in Access is notorious for causing all kinds of problems, from blinking of one or more controls to blinking of the entire form, as well as preventing command button code from consistently firing. Use of the Timer on FormA can even cause these problems on FormB, if they're both open at the same time! The problems appear to escalate in direct proportion to the frequency of the Timer firing, probably because the frequent, repeated call to the processor are interrupting its other duties.

Because of this, IMHO, its use should be reserved for mission critical purposes, and not simply for cosmetic purposes, as you're apparently doing here.

Also, blinking and/or zooming images are known to cause epileptic seizures in some susceptible individuals, which is definitely not a good thing!

Linq ;0)>
 
Thanks a lot for all in providing advices and help
I solved the problem and it's working very well, as I put the second timer on the subform shown on the main form.

missinglinq:
You're very correct but they need their organization title to appear on the form by this way, I told them that's not a proper but they insisted.

Thanks friends for your care
 
Glad you got it sorted out! Just keep the Timer events in mind if you ever start having strange, odd or curious problems with these forms. The variety of problems that I've seen, over the years, that were solved by removing Timer events is truly amazing!

Linq ;0)>
 
Glad you got it sorted out! Just keep the Timer events in mind if you ever start having strange, odd or curious problems with these forms. The variety of problems that I've seen, over the years, that were solved by removing Timer events is truly amazing!

Linq ;0)>

Thanks a lot my dear friend, I'll keep that in my mind
 

Users who are viewing this thread

Back
Top Bottom