By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,223 Members | 1,633 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,223 IT Pros & Developers. It's quick & easy.

How can i schedule a access query

P: 1
Hi all ,
i run a query on daily basis manually using ms access database.i want to run this query automatically on daily basis on a perticular time.can anybody suggest me something.
what i tried ,i made a shortcut and ttried to schedule the query...but it didnt work out .thanks in advance for your suggestion
Dec 9 '11 #1
Share this Question
Share on Google+
4 Replies

Expert 100+
P: 446
I have never done this but would start by creating a small Access application, that obviously must have links to the backend data, and have a startup form which then called the query from its On_Open event.

I don't know whether you are running an UPDATE query or a MAKE-TABLE query (there would be no point running a select query if there was no-one to view the screen !) but I suspect the form would also need a timer to close the application.

I would look to run this from Windows Scheduler but, as I said above, I have never tried this.

Good Luck
Dec 9 '11 #2

Expert Mod 100+
P: 2,321
Access by itself only runs when its open. So you cannot using solely access schedule any events. As Sierra said, if you use another program to open the database, it might be possible to make a form that opens automatically (hidden possibly) executes the query, and closes it self when done.

If you for some reasons always have access open, you can use a form with a timer, to test whether its time to run your query.
Dec 9 '11 #3

Expert 100+
P: 446
Hi again,
I can now confirm that the method proposed in my last post does actually work.

In an existing project I created a form that opens a report in the On_Load event (Also works On_Open) and has a Timer set to 100 milliseconds and a DoCmd.Quit in the Timer Event.

I closed the project and went to Windows Task Scheduler and created a new task (to run once only!). All I needed to do was specify the start time to 2 minutes hence, then path to the .mdb file (Did NOT need to pass the path to msaccess.exe!) Sit back and wait.

Access oppened, the form opened for an instant then closed Access, while the printer was producing paper!

Dec 9 '11 #4

Expert Mod 15k+
P: 31,707
This link (Invoking a Database From the Command Line) gives you full details of how to schedule your tasks in an Access project.
Dec 9 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.