How To Run Access VBA On A Timer Schedule

At one of the contracts I am on currently, I run several backup procedures through out the day on some of the main tables if something should happen while I’m not on site.

I set up a simple process. I am letting the Windows Task Scheduler, which runs as a service while the computer is on, open a database which performs the backup process, and then closes again.

I am launching a task on an hourly basis, so I don’t have to keep the database open all day.

Here is a list of procedures I am running:

I open the Task Scheduler and “Create Basic Task” (this particular one runs at 1pm daily).

This will open the MS Access 16 program on your computer:
“C:\Program Files (x86)\Microsoft Office\Office16\MSACCESS.EXE”

(Add Arguments (optional)):
Now point to the path of your database:

I didn’t do anything specific for this

The History tab just shows the outcome of your task.

So the way it works, is that when the Scheduled Task runs, a database is opened, which launches a hidden form in the database and runs my VBA code.

When the database opens, a form is launched:

The code in the “Load” event of the form is…

Here’s a part of what the folder looks like after this process is done.

That way if I am not around, they have all the vital data to keep them running smoothly until I return 🙂

Let me know if you have any questions.

Free! Subscribe To Our YouTube Channel!

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather
Tags: , , , ,


Call Erik Now