title: Windows Task Scheduler and MS Access 2013
body: <p>I am trying to utilize windows task scheduler to distribute Access reports to End Users in my company.</p>
  
  <p>All I am doing is triggering a macro that runs code from a module which exports a report to a PDF, prints it out, then exits access. </p>
  
  <p>DoCmd.Quit acQuitSaveNone</p>
  
  <p>That's what I've been using at the end of my code in VBA to close access after running a macro.</p>
  
  <p>When I manually run the macro it works fine, but when scheduled on a task, it gets held up a lot and stuck.</p>
  
  <p>I've checked event viewer to try and find any Microsoft Office alerts but do not see any.</p>
  
  <p>It appears that Access is unable to quit many times when running through Task Scheduler. Would there be a VBS I can run, say, 5 minutes after the task to close down the .accdb file and MSACCESS.EXE or is there something I can do to make these Tasks actually work?? </p>
  
  <p>It seems maybe when running in the background through task scheduler.. the code is getting ahead of itself and trying to quit at the same instance that it is finishing the output to the printer, causing it to seem "busy" and unable to actually close?</p>
  
  <p>I have an entire domino of code that shoots off after this but it stops dead in its tracks when it cannot finishing closing access.</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks,</p>
  
  <p>Ian</p>