Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Task Schedl via MS Scheduler no longer works after upgrade

Status
Not open for further replies.

wotgoesup

IS-IT--Management
Oct 25, 2002
39
0
0
US
I have been running ( daily for weeks) a scheduled task with Access97 ( running under W2K). This no longer works after upgrading to access2000. The task has a run statement of
C:\commands\MSAC2K21.exe%"I:\office\Access\RatingsEWR.mdb"%/x%RatingsRun
(% = 1 space)
The exe is where it should be, the DB folder/name is correct, and the DB has the "RatingsRun" macro in it. I have checked upper/lower case.
I tried putting this statement in a batch file. and exec'g that, but it also doesn't work.
If I have just the Access exe in the run command, Access starts up. As soon as I add the DB, I get a couple of messages about the program being installed, but then nothing opens up.
Anyone know if there's some strange syntax change I'm missing?
THANKS, Andy
 
What is this?
C:\commands\MSAC2K21.exe

Normally I'm used to seeing Access opened from this path
"C:\Program Files\Microsoft Office\Office\MSAccess.exe"
It would go in the Start In box (with the "'s marks) and then in the Run box I'm used to seeing

"C:\Program Files\Microsoft Office\Office\MSAccess.exe" "I:\office\Access\RatingsEWR.mdb"/xRatingsRun
The only space is between .exe" and "I: (unless you have spaces in your folder names).

If the path to the .exe is correct for your example then it should be

"C:\commands\MSAC2K21.exe" "I:\office\Access\RatingsEWR.mdb"/xRatingRun


 
Paul -- thanks for the input... but unfortunately it still doesn't exec. The strange exe name is due to our environment - nothing is installed on our PC's until our ID is permissioned, and all exe's seem to have "different" names.
My SA suggested leaving out the pgm name, and letting Windows associate the pgm based on the DB name extension.
I tried that - the DB opens up now, and even goes to the macro window and highlights the "RatingsRun" macro name, but it still doesn't execute. As a stop gap, I saved this macro as "autoexec", so now it executes whenever I open up Access, but at least it executes from the scheduler, and runs the macro.
If you (or anyone else) have another suggestion, please let me know.
 
I have no idea if this will work for you but it may be worth a shot.

START C:\commands\MSAC2K21.exe I:\office\Access\RatingsEWR.mdb /xRatingsRun

START opens a new window and checks some registry settings

Ken
 
If Access is stored in only one location on the machine then you can normally leave out that part of the argument but most folks don't know one way or the other so I ususally include it in the Arguments for the Scheduler.

What are the Actions in your macro? In mine, my first action is OpenReport, my second is Close and my third is Quit. It opens the report and sets the View property to print (acViewNormal), then the Close just closes the report and the Quit closes Access. It seems if it gets to the macro that it should run it.

Paul
 
The first two commands in the macro are "set warnings", and "Open Table".
 
Well it's nothing unusual but it seems you are doing more than just running a report. It's hard to say why it won't work. I wonder if you could use a Function to control what you are doing.

Function runreport()
If Date() = DateSerial(Year(Date()),Month(Date()),1) Then
Do Your Stuff Here
Else
Quit
End If
End Function

Then call the function from the macro. At least this would only run the report on the first of each month and Quit the Application if not.
Just a thought.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top