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

Running macro as a Scheduled Task

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.