Run a Macro without opening the database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to have a database run a macro when the database has not been
opened by a user? If so how would I go about doing that, also I need the
macro to only run on certain days, I have a table with the days needed to run
alreay setup. Thanks
 
Use Windows Task Scheduler, or one of the many third-party scheduling
programs available today, to run the macro using a command line like
this...
"C:\PathToAccess\Msaccess.exe" "C:\PathToDB\MyDB.mdb" /x macroname
 
I am getting this error

'The command line you used to start Microsoft Access contains an option that
Microsoft Access doesn't regonize.

Exit and restart Microsoft Access using valid command-line options'

After I click okay twice it opens the Access file but does not run the
macro. This is what I have in task scheduler:

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\PP.mdb" \x macro6

What am I doing wrong?

Thanks for any help anyone can give.
 
Let me just do it a litle easier, run the schedule task as mentioned, and in
your database create a macro and name it "autoexec" (this macro runs a soon
as the db opens) in the last row of your macro select "quit" from the drop
down linst, and that should do the trick.
 
Back
Top