On Timer Event Question

  • Thread starter Russ via AccessMonster.com
  • Start date
R

Russ via AccessMonster.com

Can you set the on timer event to do more then one thing and at different
times?
example;
every 3-min check my reminders (run some code or something)
every 5-min check my appointments (run some code or something)
every 30-min check for inactivity (run some code or something)
In VB6, I was able to place more then one timer on a form how do you do it in
Access?
 
J

Jeff Boyce

Russ

If I recall, there's a single timer behind forms in Access.

That said, it seems to me that you could build "counters" inside the event
code in your Timer event, to keep track of (and react to) 'every 3 minutes',
'every 5 minutes', 'every 30 minutes'. You'd need to 'restart' the timer
after the max time item fired.

I suppose another approach would be to kick off a long-running procedure
that checks the system clock and reacts appropriately to the intervals...

Regards

Jeff Boyce
<Access MVP>
 
K

Klatuu

I remember several years ago there was a timer Active X control, but I don't
remember if I used it in Access or in VB or where I got it or how to find it.
 
R

Russ via AccessMonster.com

Jeff,
Can you explain "counters" what are you refering to?
How is this done?
Russ

Jeff said:
Russ

If I recall, there's a single timer behind forms in Access.

That said, it seems to me that you could build "counters" inside the event
code in your Timer event, to keep track of (and react to) 'every 3 minutes',
'every 5 minutes', 'every 30 minutes'. You'd need to 'restart' the timer
after the max time item fired.

I suppose another approach would be to kick off a long-running procedure
that checks the system clock and reacts appropriately to the intervals...

Regards

Jeff Boyce
Can you set the on timer event to do more then one thing and at different
times?
[quoted text clipped - 4 lines]
In VB6, I was able to place more then one timer on a form how do you do it in
Access?
 
J

Jeff Boyce

Russ

I don't have a specific code snippet in mind (or available).

I was thinking about a generic counter that adds one (1) every time the
Timer event fires (set to, say, one minute). After this "3MinuteCounter"
reaches "3", the Timer event has fired three times (at one minute each).

If int3MinuteCounter = 3 Then
'do your 3 minute thing
int3MinuteCounter = 0
End If

Then do similar counters for your 5 minute and 30 minute thingies.

Or have I misunderstood what you're trying to do?

Regards

Jeff Boyce
<Access MVP>

Russ via AccessMonster.com said:
Jeff,
Can you explain "counters" what are you refering to?
How is this done?
Russ

Jeff said:
Russ

If I recall, there's a single timer behind forms in Access.

That said, it seems to me that you could build "counters" inside the event
code in your Timer event, to keep track of (and react to) 'every 3 minutes',
'every 5 minutes', 'every 30 minutes'. You'd need to 'restart' the timer
after the max time item fired.

I suppose another approach would be to kick off a long-running procedure
that checks the system clock and reacts appropriately to the intervals...

Regards

Jeff Boyce
Can you set the on timer event to do more then one thing and at different
times?
[quoted text clipped - 4 lines]
In VB6, I was able to place more then one timer on a form how do you do it in
Access?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top