Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / January 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MLH - 12 Jan 2006 22:36 GMT
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?
Arno R - 12 Jan 2006 23:41 GMT
> 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
Bob Quintal - 13 Jan 2006 00:02 GMT
> I have a form (frmCron) whose code in the OnTimer event
> property is set by the TimerInterval property to run 86400000
[quoted text clipped - 5 lines]
> 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

Signature

Bob Quintal

PA is y I've altered my email address.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.