Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a module with MS Scheduler

Status
Not open for further replies.

davisto01

MIS
Jul 11, 2003
21
US
Hi,

I'm trying to run a module that I've created using the windows scheduler.

This is what I have:
RUN:
"C:\Program Files\Microsoft Office\Office\msaccess.exe"
"C:\Program Files\Microsoft Office\Office\Samples\ Northwind.mdb" /x:AUTO_EXEC

START IN:
"C:\Program Files\Microsoft Office\Office\msaccess.exe"

I'm getting a message that says "Access cannott find macro AUTO_EXEC". I'm not concerned with macros right now. I'd like it to run the module.

Thanks!
TD
 
First off, I'd recommend using the freeware util HAL (Handy Access Launcher) rather than an MS Scheduler job. You can get HAL from
Secondly, the /x command line parameter is used to open your db and then run a macro, hence the error mesasge saying Access cannot find a macro called Auto_Exec. What you need to do is create a macro with two actions, firstly a RunCode command (which takes your module name as a parameter) to run the module, then a Quit command to close Access after the module has finished running. Then start Access with /x YourMacroName here on the end of the command line.

Hope this helps.
 
Hey, It works!!

Thanks!

You need the colon on the switch but you certainly want to point the scheduler to a macro that calls the code from the module.

Thanks also for the heads up on the freeware.

TD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top