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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run an Access97 Macro on a NT server automatically

Status
Not open for further replies.

AccUser

MIS
Joined
May 11, 2000
Messages
96
Location
US
Using the Windows Task Scheduler, I am able to schedule Access97 macros to executed automatically by entering the following command in the

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\LocationofDatabase\NameofDatabase.mdb" /x NameofMacro

Why, oh why, can't I schedule to run using NT AT command?

I even tried creating a *.bat file with the above command and it won't work.

Yet, when I open the database up and execute the macro, it works like a charm.

Befuddled...

AccUser
 
try making a short cut that has the link you want... then call the short cut (.lnk) with the at command... i use that when calling from a bat file... and it works like a charm...

--Junior JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
I confused. Are you saying to create a shortcut that points to bat file, say (runbatch.lnk) and then use the AT command to schedule it?

"AT \\nameofserver time /EVERY:F "C:\batfile\runbatch.lnk"

 
yup... you want to run this kind of command from an at command...


"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\LocationofDatabase\NameofDatabase.mdb" /x NameofMacro

so put that into a shortcut...

then start the shortcut from your at command line... that will then run the
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\LocationofDatabase\NameofDatabase.mdb" /x NameofMacro
... it confused me the first time i starting thinking like that, but make a shortcut, and make sure it works the way you want it to, then try starting it from an at command...

--Junior JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
will try and let you know how it works out.

thanks in advance.

accuser
 
np... JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
Well, I was finally able to get away from my desk to create the shortcut on the server.

I tested the shortcut at the command line:

c:\batfile\sendfore.lnk

It worked with no problem, but when I scheduled:

AT \\nameofserver 16:26 "c:\batfile\sendfore.lnk"

At 4:26pm, nothing happened on the screen and when I checked the c:\AT, the job was gone.

Any ideas?
 
well, at this point it sounds like an at scheduling think... you ran the link from the server and it ran fine?? then i can't help any more... when you create it go back and make sure it saves it... other wise, i don't know where to start... i've never used an at scheduler...

--Junior JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top