Scheduled queries

T

Travler

Is there any way to schedule a query to run unattended without the database
open. I need to update 1 table with info from another on a regular basis, the
querie is simple enough I just need it to run several times a day.
Any ideas.

Thanks.
 
T

Tom Wickerath

Hi Travler,

Reduce the size of the Access window, so that you can see your desktop. Then
drag your query to the desktop. If you have more than one version of Access
installed on the same machine, then create a macro that runs your query. Then
create a shortcut that includes the full path to msaccess.exe, your database
file, and the /x macro switch as shown in this KB article:

How to use command-line switches in Microsoft Access
http://support.microsoft.com/?id=209207

Each value is surrounded by double quotes, and separated with a single
space. Note that you are limited to 256 characters total in the target line
of the shortcut. For example, the target might look like this (all on one
line):

"C:\Program Files\Office2K\Office\msaccess.exe" "C:\AccessDB\MyDB.mdb" /x
"MyMacroName"

The macro needs to include the following four actions:

SetWarnings No
OpenQuery Name of your update query (Datasheet view / Edit mode)
SetWarnings Yes
Quit

Finally, use Windows task manager and add your new shortcut as a scheduled
task.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Is there any way to schedule a query to run unattended without the database
open. I need to update 1 table with info from another on a regular basis, the
querie is simple enough I just need it to run several times a day.
Any ideas.

Thanks.
 
Top