Task Scheduler not working with MS Access

I had an MS Access app that was running a macro via Task Scheduler using the /x parameter. The macro was calling a public function, which is the only way you can call code from outside MS Access. The job would import a CSV file and it would work fine through the command prompt or via a batch file. BUT Task Scheduler would NOT run it. I would always get this issue!!

Microsoft Excel cannot access the file 'C:\Development\MSAccess\Import\ImportFile.csv'. There are several possible reasons:

• The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook.

So the solution for me was to download this: https://www.splinterware.com/products/scheduler.html

It's working now! If I have to pay for it at some point then $30 USD is well worth it for the days that I have spent trying to figure out why Task Scheduler won't run the job properly!

I posted this here too: Scheduled MS Access macro to run query and export to CSV - Stack Overflow

Add comment

Loading