running a macro at a specific time

D

doug

would anyone know how the expression i would use to make
a macro run at a specific time, i cant get my head round
it ?
 
S

Steve Schapel

Doug,

If you mean use Windows Task Manager or some other scheduling software
to control this, the Command Line you need in the scheduling programme
is probably like this syntax...
"C:\PathToAccess\Msaccess.exe" "C:\PathToDB\MyDB.mdb" /x macroname

If you mean you want to run the macro at a certain time within Access,
you will need to assign the macro to the OnTimer event of a form which
is always open, and put a Condition in the macro such as...
Time()>#4:00:00 pm#
You will also need, then, to add another action to the macro, to
either set the TimerInterval of the form back to 0 so the macro
doesn't repeat, or else change the value of a check field somewhere to
indicate that today's run has taken place.

- Steve Schapel, Microsoft Access MVP
 

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