Run a Macro without opening the database

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
 
G

Guest

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
 
G

Guest

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.
 
G

Guest

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.
 

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