Macro to Auto run

J

Jacinda

I have a database which updates tables from an ODBC database. The updates are
run from a set of macros/queries to feed my tables...

How do I get the main macro to run (which triggers all of the updates),
without opening this database and excuting the function myself...

I have the database out on my server and I want it to be automatic every 4
hours or so during the day.
 
S

Steve Schapel

Jacinda,

Basically 2 approaches...

1. Leave the database open on the server all the time, with a form open.
Assign the macro on the Timer event of the form, and set the TimerInterval
property of the form to 14400000 (milliseconds in 4 hours).
(A variation on this theme would be to set the Timer Interval to a
smaller amount, and then use a Condition in the macro to run it according to
the current Time.)

2. Set up a scheduled task using Windows Task Manager or a third party
scheduling utility to run at the times you want. The command line for the
task scheduler will follow this syntax:
"C:\...PathTo Access...\Msaccess.exe" "C:\YourFolder\YourDB.mdb" /x
NameOfMacro
 

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