PDA

View Full Version : Schedule a Macro to run in Access



rsilberfarb
09-26-2006, 01:35 PM
Hello.

I have a macro that I would like to run every weekday at 10am. Utilizing the task schedule in windows I can open Access, but I do not want to run the macro everytime the dB opens (autoexec).

I have checked here I cannot get it to work
http://support.microsoft.com/kb/230575/EN-US/.

Please help.

geekgirlau
09-28-2006, 12:58 AM
In the Task Scheduler, you need to create a shortcut in the following syntax:

Full path to MSAccess.exe
Full path to your database
/x
The name of your macro in quotation marksExample:
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "H:\MyDatabase.mdb (file://\\NASFILE01\akilmart\db1.mdb)" /x "MyMacro"

If you do this (and don't name your macro "AutoExec") the macro will only run via the Task Scheduler, not each time you open the database.