Windows 7 task scheduler not firing off with Access.

I have an access db that needs to open within a scheduled task on a windows 7 pc, the scheduled task has admin rights to open the access db. I also tried putting the commands in the following script file. When I click on the script or click on the db it will run ok, what could be causing the scheduled task not to run ?

Here is the code of the script that I point the schedule task to run.

START [serverpath]\databasename.mdb
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hypercat (Deb)Commented:
What are the other commands that are part of this scheduled task?  Are you trying to run a query or macro within the Access database, or something else?

Also, look at the history of the scheduled task to see what exactly is happening and post any errors or Last Result information that you see there.
cobpAuthor Commented:
I have an autoexec inside the query.
cobpAuthor Commented:
All I need the scheduled task to do is open and close an access database to run a query.
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

cobpAuthor Commented:
Actually run a macro to create a file.
Hypercat (Deb)Commented:
To open the database and run a macro, you need to add the following to the end of the command:  /x [macroname]
cobpAuthor Commented:
Can you give me the example ?
cobpAuthor Commented:
Would this be it ?

START [serverpath]\databasename.mdb /x Autoexec
Hypercat (Deb)Commented:
Yes, although I'm not entirely sure about the START command.  The one example I have in use doesn't need the START command, but it's an .accdb (Access 2010) not an .mdb. My batch file is simply:

"[serverpath or mapped drive letter]\database.accdb" /x [macroname]

If the START command works for you, then by all means leave it in.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.