how to schedule macros.

  • Thread starter Thread starter Khan
  • Start date Start date
K

Khan

I have a micro that needs to be run every hour. Anyone has
any idea how to do that.
Thanks.
 
If you meant every hour while the database is open, then use the Timer Event
of a hidden dummy Form (or a Form that is *always* open when the database is
in use) and run your Macro with the RunMacro Method.

If you meant even when the database is not open, then create a Shortcut Icon
using the /x option of the (Access) Startup Command-Line Options (check
Access Help) to run your Macro. You can then use the Windows Scheduler to
run this ShortCut Icon every hour (???).
 
Hi,

You can create form, which will be run hidden as below

docmd.OpenForm "", , , , , acHidden

Set the form's TimerInterval propert to 3600000
and add the following code to On Timer event procedure


Private Sub Form_Timer()
DoCmd.RunMacro "yourmacroname"
End Sub

If you need more help, you can contact me.

HTH,
Bogdan Zamfir

______________________________
Independent consultant
 
Back
Top