How do I write VBA to start my Access macros based on my PC clock

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

Guest

I am searching for an efficient way to kick-off my Access databases in the
morning prior to people getting into the office. My macros are written but
they require physical intervention to start them. I need VBA code that will
run my macros at a predetermined time each morning. This needs to be done
without access to the c:\ drive as our company does not allow access to
various administrative tools and the Control Panel is one of them. Thanks in
advance.
 
If you're working in Access, one way is to use a form's Timer. Set the
form's TimerInterval to say 3600000 (i.e. 1 hour), and in the OnTime
event procedure put code that calls Time() and checks whether it's time
to launch the macro.

Of course this can only work if you leave Access running overnight. If
you want Windows to check the time and launch Access when appropriate,
you'll need to use either Scheduled Tasks or the older AT command.
 
Back
Top