different access queries automate

tuxo99

Board Regular
Joined
Aug 13, 2015
Messages
75
Hello,

It is possible to programm access queries so they start for example 1 at 24:00, another at 03:00 and the other at 05:00.

Thank you
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Yes, and some would tell you to do this using at least one form (can be invisible that loads when the db opens) with a timer event coded to run the query. How you would tell it which one to run is up to you, or you could have a form for each query. However the db has to be open as many hours as required across the time span - maybe 24/7. I would not vote for this method.

I would do it using Windows Task Scheduler (this should be already installed in your version of Windows) and have WTS open your db with a command line switch at the scheduled time. The command line switch in the launch path would contain, say, the query name to be run at that hour. You would need a WTS event for every query that needs to run. In your db, you would need an autoexec macro that runs startup code. This code checks for the value of the switch you provide, and if none is found, it means someone opened the db in the normal fashion. In that case, you simply bypass the query running code. When a switch is found by the code, it runs the right query and closes the db (if that's what you want). It might sound complicated, but it's not and WTS is not difficult to learn to use.
 
Upvote 0
I also use the Windows Task Scheduler to do this.

I also make a separate front end for each unique process. Each front end can run multiple queries or VBA code routines.
 
Upvote 0

Forum statistics

Threads
1,221,841
Messages
6,162,314
Members
451,759
Latest member
damav78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top