473,698 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:\PathToDatab ase\database.md b" /user "myUsername " /pwd "myPassword "
/x "MakeListboxTab les"

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 27762
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******@hotma il.com> wrote in message
news:15******** *************** **@posting.goog le.com...
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:\PathToDatab ase\database.md b" /user "myUsername " /pwd "myPassword "
/x "MakeListboxTab les"

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:\PathToDatab ase\database.md b" /user "myUsername " /pwd "myPassword "
/x "MakeListboxTab les"

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
14695
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 task (processing SQL so I'm told) I have been asked if I can setup a page within ASP that a user could logon to with their own credentials (this I can do). And once logged on be presented with a list of scheduled tasks which they can then...
5
4576
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, etc. All my command scripts utilizing this console application work fine when they are executed interactively. However, if they are executed via a scheduled task, they do not run. Or more precisely, the script seems to execute at the...
2
5849
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 reading from a template file and inserting text at bookmark locations (with details pulled from a table in the database). I'm running the app under a regular domain account that isn't an administrator on the server. The read/execute permissions are...
6
8245
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, but I need to launch the add tasks wizard inside the folder. Does anyone have any ideas of how to do this? I can't find anything in the MSDN regarding this. All it mentions is the Task Scheduler API and I can't seem to find it in there either. Did...
1
7487
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. We migrated a database from SQL 2000 to 2005 which is on a different box. I changed the connection in the vb script to use the new sql server. The original connection to SQL 2000 used the 'sa' account coded into the connection string , which...
9
3776
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 directory. This exe does the following 3 things: 1.) Using the VB Interaction SaveSetting() method, it programmatically updates the system registry under the HKEY_CURRENT_USER\SOFTWARE key and saves a directory location used by a PDF driver (so that...
2
4309
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 from the command window and the print() is very handy for us to debug and monitor. When running the task from Windows Scheduled Task, we'd like to be able to view the command window and keep it up after the Task has completed... I used the commands
0
1230
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 haven't had any trouble with that before. Maybe you're doing something unusual? Have you tried using the logging module, rather than print? Might be more useful for what you're trying to do.
1
4322
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 minute, some of the texts should be written). When I run the task manually, it acts exactly as it should. When I go to run the task automatically, it will work, but only if I am logged in. If I am logged off, nothing gets updated, and the...
1
4270
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 manually stop the task in order for the next scheduled backup to run. Is there a command line switch that I can use to force quit the program after it is completed or even if the job does not complete. Thanks for your help in advance
0
8608
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9161
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8897
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8867
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6522
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.