Seamus2626
asked on
Scheduling Access
Hi,
I have a scheduled task to open an Access DB which then runs a macro.
If i do this manually, it is fine, if i schedule it over night it does not run. Is there an issue with the fact im logging off?
Thanks
Seamus
I have a scheduled task to open an Access DB which then runs a macro.
If i do this manually, it is fine, if i schedule it over night it does not run. Is there an issue with the fact im logging off?
Thanks
Seamus
FWIW, if you use this, log on/log off is irrelevant:
http://www.fmsinc.com/microsoftaccess/Scheduler.html
http://www.fmsinc.com/microsoftaccess/Scheduler.html
ASKER
Thanks guys, ive went through the steps from the Microsoft site but i cant seem to get it going.
Ive typed the below into Notepad and saved it. It wont open though, and the error message appears very quickly and goes away
C:\Program Files\Microsoft Office\officeMsaccess.exe C:\Copy of Triple Link_2011-03-15.mdb /x Macro1
/x Macro1
Is there an error in the above path possibly?
Thanks
Seamus
Ive typed the below into Notepad and saved it. It wont open though, and the error message appears very quickly and goes away
C:\Program Files\Microsoft Office\officeMsaccess.exe C:\Copy of Triple Link_2011-03-15.mdb /x Macro1
/x Macro1
Is there an error in the above path possibly?
Thanks
Seamus
ASKER
I tried putting it in the CMD editor and get the following error message
Z:\>c:\program files\microsoft office\office Msaccess.exe\c:northwind.m db/x macr
o1
'c:\program' is not recognized as an internal or external command,
operable program or batch file.
Thanks
Seamus
Z:\>c:\program files\microsoft office\office Msaccess.exe\c:northwind.m
o1
'c:\program' is not recognized as an internal or external command,
operable program or batch file.
Thanks
Seamus
Seamus
Try putting Quotes round items in the command line. The problem is that there are spaces in folder/file names and these are causing it to be treated as 2 or more command line items.
C:\Program Files\Microsoft Office\officeMsaccess.exe "C:\Copy of Triple Link_2011-03-15.mdb" /x Macro1
Greenclock
For the command prompt test........
"c:\program files\microsoft office\office Msaccess.exe" "c:{full path}\northwind.mdb" /x macro1
Greenclock
ASKER
Thanks Greenclock.
I saved a file called MyTes.bat and entered
cmd.exe/c
"c:\northwind.mdb" /x macro1
That works fine if i double click it, but wont run when im logged off, it says in the scheduled taks "running"
Its using my user name where its says "Run as"
Do you think its an administration issue?
Thanks
Seamus
I saved a file called MyTes.bat and entered
cmd.exe/c
"c:\northwind.mdb" /x macro1
That works fine if i double click it, but wont run when im logged off, it says in the scheduled taks "running"
Its using my user name where its says "Run as"
Do you think its an administration issue?
Thanks
Seamus
Seamus
Which Operating System and version of MS Access are you using?
Greenclock
Which Operating System and version of MS Access are you using?
Greenclock
ASKER
Its 2003 Access and Microsoft Windows XP Professional
Thanks
Seamus
Thanks
Seamus
OK
- Does the macro have an entry to exit MS Accees?
- Is the ID you setup the job with and Administrator?
Greenclock
- Does the macro have an entry to exit MS Accees?
This may explain why it keeps on running...
- Is the ID you setup the job with and Administrator?
Reason: To run a task while not logged on you need "Run As a Batch" rights. The administrator access will allow this when the job is created.
You can grant this right using the "Local Policy Settings" Tool.
Type the following at the command line:
ntrights.exe -u {user or Groupname} +r SeBatchLogonRight
If you get an error then the Windows Resource kit is is not install
http://go.microsoft.com/fwlink/?LinkId=4544
You can grant this right using the "Local Policy Settings" Tool.
Type the following at the command line:
ntrights.exe -u {user or Groupname} +r SeBatchLogonRight
If you get an error then the Windows Resource kit is is not install
http://go.microsoft.com/fwlink/?LinkId=4544
Greenclock
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys, need to get myself set up with Admin rights
Cheers,
Seamus
Cheers,
Seamus
Take a look at the following Microsoft Document
http://support.microsoft.com/kb/230575
Hope this helps
Greenclock