Automatic updating of MS Access Databases using scheduled tasks

From CCMDB Wiki
Revision as of 19:47, 2018 July 23 by Ttenbergen (talk | contribs) (Moved here from the SRT Wiki.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page contains information on how to use a scheduled task to run code in MS Access. PHI copy automation uses this.

This is done as follows:

  • set a form to be the form opened at start-up in an Access .mdb (menu -> tools -> startup)
  • set the on form open event for the form to, if now() is between 1 and 5
    • run an update or maketable query
    • close the program
  • set up a scheduled task to open the program within the above timeframe

Probably want to have the .mdb compact and repair on close.

Need to delete db#.mdbs occasionally if this is run on a server, for some reason MS Access doesn't clean them up. Suppose could add that to the updater code.

Related Articles

Related articles: