I have a VM running Windows Server 2008 R2 Enterprise and want to use the Task Scheduler to run an Access script. This script will do some stuff and then close. I've already written and tested the command line in a batch file and it works perfectly:

"C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE" "C:\MyPath\Mydb.accdb" /x "MyMacro"

I've also created a task in the scheduler. I think it opens up the MSACCESS.EXE and passes the other 2 parts of the command line as arguments.

However, when I manually run this in the scheduler, nothing happens. According to the logs, the task is started and then nothing. Looking in the Task Manager, I don't see Access running.

Did I set up the task wrong? The last task scheduler I used was Windows XP (which was very simple compared to this).


I've also tried this without the arguments, just using "C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE" for the action. I would expect Access to open, but still nothing happens.

  • Have you set the Action as Start a Program? – Yass Sep 13 '13 at 16:30
  • @yassarikhan786, yes. – PowerUser Sep 13 '13 at 17:03
  • In which user context does the scheduler run the MS Access? Does that user have sufficient access rights to the .accdb file? – Michał Sacharewicz Sep 13 '13 at 20:29
  • I am using my own user account and "run with highest privileges" is checked. Also, I can successfully run this command line from a batch file. – PowerUser Sep 13 '13 at 21:30
  • The History tab seems to always stop at Event#129:"Created Task Process". – PowerUser Sep 13 '13 at 21:33

I believe you must select "Run only when user is logged on" in your Windows Task Scheduler Job Properties. You must also be logged on to automatically have scheduled Access macros run.

This really seems like a huge limitation of Access, but I have not seen another solution out there. It would be great to have a solution for running an Access macro while logged off.

  • I don't recall if I did that or not. In the end, I gave up on the VM and just had a user run the script as needed. In hindsight, this turned out to work better for us than my original VM attempt. – PowerUser Jan 31 '14 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.