Scheduled Tasks problem firing Macro

G

Guest

I'm trying to execute an Access 2003 macro called "ExportIt" using the
Scheduled Tasks utility bundled with Windows 2K. This syntax (note, without
double quotes) does work:

C:\Express\ImportExport.mdb

However, when I add in the macro I want fired, it does not work:

C:\Express\ImportExport.mdb /X ExportIt

I also put quotes around the macro name, but it still failed. How do I get
Scheduled Tasks to fire the macro without having to rrename the macro
"AutoExec"?
 
T

TPratt

It seems to me that you're missing quotes around the path.

should be...

"C:\Express\ImportExport.mdb" /x ExportIt
 
G

Guest

You could try having a form open in startup.

Using the on open event of the form put your code.

I wish we could give screen shots.

The command line for Access 2003 is somwhat strange.

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /excl
\\Smfr01\Data\P_2003.MDB

In a link. Note that the path and the applicaiton is in quotes while the
/excl and target database are not.
 
S

Steve Schapel

Agreed. In addition, you should also put the Access program in the
command line of the scheduler, the equivalent of...
"C:\PathToAccess\Msaccess.exe" "C:\Express\ImportExport.mdb" /x ExportIt
(replace PathToAccess with the actual folder path to your Msaccess.exe file)
 
G

Guest

This syntax finally worked (note quotes around macro name):
"C:\Microsoft Office2003\OFFICE11\MSACCESS.EXE"
"C:\Express\ImportExport.mdb" /X "ExportIt"

Thanks everyone for the help.
 

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