By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,573 Members | 938 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,573 IT Pros & Developers. It's quick & easy.

OnTimer event interval - I need to run it when form is opened

P: n/a
MLH
I have a form (frmCron) whose code in the OnTimer event property
is set by the TimerInterval property to run 86400000 milliseconds. I
open this form in the AutoExec sequence when the mdb file opens.
I was hoping the code ran as soon as frmCron opened and then
every 86400000 milliseconds thereafter. But, of course, that is not
the case.

How can I run the code as soon as frmCron is opened and then
every 86400000 milliseconds thereafter?
Jan 12 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"MLH" <CR**@NorthState.net> schreef in bericht news:q6********************************@4ax.com...
How can I run the code as soon as frmCron is opened and then
every 86400000 milliseconds thereafter?


Set TimerInterval to 10 and open/close your db every day at the same time?
Is this a db that runs 24/7 ??

I guess you only need something like a TimerInterval of 10 or so.
Run your code and reset the TimerInterval the first time like ...

Sub Form_Timer()
Me.TimerInterval=86400000
Your code here ...
End sub

Arno R

Jan 12 '06 #2

P: n/a
MLH <CR**@NorthState.net> wrote in
news:q6********************************@4ax.com:
I have a form (frmCron) whose code in the OnTimer event
property is set by the TimerInterval property to run 86400000
milliseconds. I open this form in the AutoExec sequence when
the mdb file opens. I was hoping the code ran as soon as
frmCron opened and then every 86400000 milliseconds
thereafter. But, of course, that is not the case.

How can I run the code as soon as frmCron is opened and then
every 86400000 milliseconds thereafter?


In the form_open event,
Call OnTimer

--
Bob Quintal

PA is y I've altered my email address.
Jan 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.