473,396 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Running macro as a Scheduled Task

Hello all.

I want to schedule an Access macro to run. The macro runs 3
make-table queries.

The best way I thought to accomplish this is to create a shortcut, and
then use the task scheduler to run that shortcut.

I am working within a secure workgroup. Here is what my shortcut
contains:

"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
"C:\PathToDatabase\database.mdb" /user "myUsername" /pwd "myPassword"
/x "MakeListboxTables"

Manually running this shortcut works fine, except for one thing--
since make-table queries are what the macro runs, a total of 6 dialog
boxes pop up, 2 for each make-table query. The first asks me to
confirm that I want to run a make-table query. Once the query runs, a
second dialog box ask me to confirm that I want to insert X rows of
data into the new table.

Of course, sitting at my computer, I can click "Yes" 6 times and
accomplish the task. My question is.... how can I skip the dialog
boxes so that I can automate this task with the task scheduler? Is
there another /switch I can use on the command-line (that is, my
shortcut) that will bypass these dialog boxes?

I'm so close to making this work! Please, any help is greatly
appreciated.

Thanks so much!
Nov 13 '05 #1
2 27751
Set the First line of your macro to be SetWarnings = No and the Last line to
be SetWarnings = Yes.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
"E Harris" <re******@hotmail.com> wrote in message
news:15*************************@posting.google.co m...
Hello all.

I want to schedule an Access macro to run. The macro runs 3
make-table queries.

The best way I thought to accomplish this is to create a shortcut, and
then use the task scheduler to run that shortcut.

I am working within a secure workgroup. Here is what my shortcut
contains:

"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
"C:\PathToDatabase\database.mdb" /user "myUsername" /pwd "myPassword"
/x "MakeListboxTables"

Manually running this shortcut works fine, except for one thing--
since make-table queries are what the macro runs, a total of 6 dialog
boxes pop up, 2 for each make-table query. The first asks me to
confirm that I want to run a make-table query. Once the query runs, a
second dialog box ask me to confirm that I want to insert X rows of
data into the new table.

Of course, sitting at my computer, I can click "Yes" 6 times and
accomplish the task. My question is.... how can I skip the dialog
boxes so that I can automate this task with the task scheduler? Is
there another /switch I can use on the command-line (that is, my
shortcut) that will bypass these dialog boxes?

I'm so close to making this work! Please, any help is greatly
appreciated.

Thanks so much!

Nov 13 '05 #2
E Harris,

Put a SetWarnings,No action in your macro, prior to your first RunSQL or
OpenQuery action.

--
Steve Schapel, Microsoft Access MVP
E Harris wrote:
Hello all.

I want to schedule an Access macro to run. The macro runs 3
make-table queries.

The best way I thought to accomplish this is to create a shortcut, and
then use the task scheduler to run that shortcut.

I am working within a secure workgroup. Here is what my shortcut
contains:

"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
"C:\PathToDatabase\database.mdb" /user "myUsername" /pwd "myPassword"
/x "MakeListboxTables"

Manually running this shortcut works fine, except for one thing--
since make-table queries are what the macro runs, a total of 6 dialog
boxes pop up, 2 for each make-table query. The first asks me to
confirm that I want to run a make-table query. Once the query runs, a
second dialog box ask me to confirm that I want to insert X rows of
data into the new table.

Of course, sitting at my computer, I can click "Yes" 6 times and
accomplish the task. My question is.... how can I skip the dialog
boxes so that I can automate this task with the task scheduler? Is
there another /switch I can use on the command-line (that is, my
shortcut) that will bypass these dialog boxes?

I'm so close to making this work! Please, any help is greatly
appreciated.

Thanks so much!

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Colin Steadman | last post by:
We have a number of scheduled tasks on our IIS server that run daily at some point during the early morning. These tasks run as a specific user that has the correct permissions to perform whatever...
5
by: A. Lovhaug | last post by:
I have a console application built in the .NET Framework. This application basically executes an XCopy based on parameters that I pass to it. I use it for creating scripts for backing up folders,...
2
by: David Olive | last post by:
Hi guys, I'm having a bit of a problem getting a VB .NET console app to run happily as a scheduled task. The app itself generates a bunch of word documents on a file share on another server by...
6
by: John Bowman | last post by:
Hi, I have a C# app that needs to launch the "Add Scheduled Tasks" wizard found in the control panel "Scheduled Tasks" applet. I realize that this "applet" really just opens the tasks folder,...
1
by: Myster Edd | last post by:
I have a strange problem that I think deals with security on SQL 2005. I have a scheduled task that runs on a Windows 2000 machine. It calls a vb script which creates a connection to SQL Server. ...
9
by: jdaelhousen | last post by:
I have a bit of a problem I'm hoping someone can shed some light on... I have a VB.Net console application written in VS 2003 that produces a .exe file that now sits on a Windows 2000 server...
2
by: korean_dave | last post by:
Does anyone know how to properly kick off a script using Windows Scheduled Task? The script calls other python modules within itself. HERE'S THE CATCH: I am used to running the script directly...
0
by: Andreas Tawn | last post by:
Does anyone know how to properly kick off a script using Windows Import os and add os.system("pause") at the end of AutomatedTestRun.py to keep cmd open. As far as not seeing any output, I...
1
by: oct08 | last post by:
Hi all, I'm trying to trouble shoot an issue where I am running an Access/VBA app, which grabs some data and puts it into a few text files. It usually takes 10 minutes to run (though after even a...
1
by: ranjitw | last post by:
I am running backup to .mdb file on a Windows 2003 server . My issue is that when the program completed it still is in a "running" state when I highlight the icon for the scheduled task I have to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.