Command Line Options

tmort

Registered User.
Local time
Today, 16:05
Joined
Oct 11, 2002
Messages
92
I'd like to have Windows Scheduler open a specific database to a specific macro on a regular basis. I want to do this for a couple of databases for different purposes in each one.

I see that to open the database I just use path...databasename.mdb. According to Microsoft I should be able to use the switch /X to specficy a macro to open. When I try path...databasename.mdb /X macroname it doesn't work.

Do I have to use some sort of dilineator or no spaces or something. I am using Access XP.

I realize I can make the macro an autoexec macro, but, I have a reason or two I'd prefer not to do this.

Does anyone know anything about these swithches?

thanks in advace
 
You have to use:

"c:\program files\microsoft office\office\msaccess.exe" c:\yourdb path\yourdb.mdb /X MacroName

Note: It is a Macro and NOT a module that gets called. If you want to run VBA code then make that code a function and call the function from the macro (RunCode)

HTH
 

Users who are viewing this thread

Back
Top Bottom