Scheduling a query to run

  • Thread starter TotallyConfused
  • Start date
T

TotallyConfused

Can you schedule a query to run in Access automatically? If so can someone
please tell how to go about it or where I can find info how to incorporate
this into a database. Thank you in advance for any help you can provide.
Thank you.
 
J

June7 via AccessMonster.com

Do you want to run even when the project is not open? I have read some about
using Windows Task Scheduler to do this. Either through a .bat or .vbs file
or directly to Access. I tried opening Access through VBScript but not having
much luck. Here is the sample code I found:
Set objAccess = CreateObject("Access.Application")
objAccess.OpenCurrentDatabase "C:\filepath\mydatabase.mdb"

Also code for .bat file (again, I can't make work):
C:\Program Files\Microsoft Office\Office\MSAccess.exe" "C:\myDB.mdb"
/macroname

If you only want to do it when project is open, what would be the condition
for initiating the action - when project opened, following data entry, time
of day? Here is one thread to check out:
http://www.tech-archive.net/Archive/Access/microsoft.public.access.queries/2005-06/msg01204.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top