Windows 7 task scheduler not firing off with Access.

Hello,
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
EXIT
cobpAsked:
Who is Participating?
 
Hypercat (Deb)Connect With a Mentor 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]
exit

If the START command works for you, then by all means leave it in.
0
 
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.
0
 
cobpAuthor Commented:
I have an autoexec inside the query.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
cobpAuthor Commented:
All I need the scheduled task to do is open and close an access database to run a query.
0
 
cobpAuthor Commented:
Actually run a macro to create a file.
0
 
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]
0
 
cobpAuthor Commented:
Can you give me the example ?
0
 
cobpAuthor Commented:
Would this be it ?

START [serverpath]\databasename.mdb /x Autoexec
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.