using task scheduler to run a macro

G

Guest

We have a battery of queries that generate some calculations and do some
quality control on data; they are too complex to run as a single query, and
we've moved to a situation where we run a cluster of make-table queries via a
macro to do the calcs and QC, and then we build and run our analysis queries
against those tables.

Our data changes, but not quickly, so running the make-table queries each
morning would satisfy our needs, and we can always run the macro by hand if
we know there's been a major update.

I've found an old thread that confirms that Task Scheduler can run macros,
but the wizard doesn't appear to go into the depth necessary for this to
happen and I can't find anything in the help systems.

Is there a how-to on scheduling a simple macro via the task scheduler under
Windows XP? The database is passworded.

Thanks, Eric
 
A

AlCamp

Eric,
I think your looking for "Startup command-line options" in Access. Check
that out in Access Help.
Using these command line options, Task Scheduler could open Access, open
your mdb, and run a specific macro.
hth
Al Camp
 
C

Chris Reveille

In windows 2000 I use this
Using the windows scheduler...
- add a Scheduled Task
- migrate to Microsoft Access as the program you want to run
- when you've completed the wizard, right click to view
the properties of
the new task
- you'll need to add the path of your database, in
quotes, to the end
of the existing string in the "Run" box.
- then, at the end of the path you just added, enter
the following...
/x NameOfMacro
- it should look something like this: "C:\Program
Files\Microsoft
Office\Office\msaccess.exe" "C:\My
Documents\MyDatabase.mdb" /x NameOfMacro
--the first part may vary depending on the
version of Access
you're running--

or

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

Chris
 
G

Guest

Chris Reveille said:
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE"
"C:\PathToDatabase\database.mdb" /user "myUsername" /pwd
"myPassword" /x "nameOfMacro"

Thanks Chris. As it turns out, for reasons lost to the dawn of time, this
database has no username, only a password. I've tried '/user ""' and I've
tried leaving the /user argument out altogether, but it's not working.

Any additional ideas would be most welcome.

--Eric
 
C

Chris Reveille

Why do you need the access db that would be located on on
one machine(the one schedulling the task) password protected?
Copy the queries/macros to a new db and schedule that one.

Chris
 
G

Guest

Chris Reveille said:
Why do you need the access db that would be located on on
one machine(the one schedulling the task) password protected?
Copy the queries/macros to a new db and schedule that one.

The db resides on a server. Three of us access it from our workstations. I
could schedule it from my machine or from the server itself, but the
"password, no user" situation is going to exist no matter what. The goal is
to make the fresh tables available to all of us first thing in the morning
sithout thinking, so I don't see how copying the database is going to help us.

I expect that we should be using replication and a whole host of other
better practices, but this is the situation I face.

Thanks, Eric
 
C

Chris Reveille

The password is only required when initially opening the
db. Keep a copy of the db open on the server and setup a
form with a timer event on which kicks off the macro every
24 hours.

Chris
 

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