Schedule a macro to run daily

N

Nat

I need to have a macro run daily. The database is keep on a server. Is
there a way to set it to run with out using optional command line switch.
when reading up on the optional command line it is telling us to go thought
the Start menu or a shortcut menu. I need it to run with having to log into
a computer every day.
 
A

Arvin Meyer

The only way I know of, unless the database is kept running on the server
24/7 (not a good choice for either Access or security) is to use an outside
scheduling program like the Windows scheduler to fire up the database and
use a start form, autoexec macro, or command line switch to fire off your
code.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
N

Nat

I was told that I could use the Timer Event. Do you have an example of the
code?
thanks
nat
 
R

Rick Brandt

Nat said:
I was told that I could use the Timer Event. Do you have an example
of the code?
thanks

That would require that the application run 24 hours a day and then use the
Timer event to check the what the system time is at some interval and then
perform some action at certain times. Do you really want this thing to try
to run 24 hours a day?

Arvin's suggestion to schedule a task that launches the file and then have
code that automatically runs and then closes the file afterwards is much
better.
 
A

Arvin Meyer

You can use the Timer event, but if you do and power goes off in the middle
of the night, there's a chance of corrupting the database. There are dozens
of scheduler applications out there many of which are free. Just Google for
them.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 

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