Access Front End won't run as a scheduled task

Bob Vitter 181 Reputation points
2021-01-20T00:49:42.72+00:00

Windows 2012 R2 Server, Windows 10 H2 workstation, MS Access 2016

This problem started recently and is limited to 1 workstation

Scheduled Task runs a batch file which in turn executes DOS commands (Dir, Copy) and Access databases

The DOS commands before the 1st run Access command execute

It used to work on this workstation but stopped recently, it does work on other workstations and works if I directly execute the batch file (double click it)

The Access application opens then immediately stops working - no corresponding Events

I have scaled a test version back to a single VBA command (called from AutoRun Macro) DoCmd.OutputTo (simple table to a text file) and it still fails without creating the text file

Access is left open, I use Task Manager to close Access then I can delete the laccdb file

SFC and DISM do not find any problems, I repaired MS Office but this did not help

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,687 questions
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Bob Vitter 181 Reputation points
    2021-01-27T17:21:04.097+00:00

    I created an Excel spreadsheet with a macro that just exits Excel

    This spreadsheet works when executed directly or from a bat file but fails when the bat file is executed from a scheduled task - just like the Access front end

    Soooo ... the problem is not with Access but with something in Windows that is not allowing an office application to run when called from a scheduled task - even if the task runs while I am signed in

    When I look at the scheduled task after the run time it shows as running (0x41301)