This may not be worth much, but I have not had much luck with the
Windows scheduler. I write my own schedulers in either VB6 or VB.Net.
You have way more control over Access with a VB app. You can invoke
Access or check if an instance of Access is already running (just check
if the corresponding ldb file is alive). If it exists, then don't
invoke Access. If there is no ldb for that file, then invoke Access.
You can run subs in Access from a VB app.
Dim AccApp As Access.Application
AccApp = CType(CreateObject("Access.Application.10"),
AccApp.OpenCurrentDatabase(Application.StartupPath & "\AccessDB1.mdb")
This is a sample VB.Net sub. You create the Access Object, open an
Access mdb (which happens to be in the same directory as the VB app --
Application.StartupPath), you run a sub in Access (subGetData) and pass
in an argument (a date arg here)
When the sub is done, you close Access. The sub runs synchronously here
- means you won't go to the next line of code in the VB app until Access
finishes runnning the sub. Then you close Access down and quit the
You can set a Timer object in the VB app and set that to run based on
your specs, hourly, daily, twice a day, etc. Way more flexibility than
the Windows Scheduler. Way more reliable.
*** Sent via Developersdex http://www.yqcomputer.com/