Solved

Windows 7 task scheduler not firing off with Access.

Posted on 2014-03-14
8
863 Views
Last Modified: 2014-03-17
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
0
Comment
Question by:cobp
  • 5
  • 3
8 Comments
 
LVL 38

Expert Comment

by:Hypercat (Deb)
ID: 39929348
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
 

Author Comment

by:cobp
ID: 39930056
I have an autoexec inside the query.
0
 

Author Comment

by:cobp
ID: 39930373
All I need the scheduled task to do is open and close an access database to run a query.
0
 

Author Comment

by:cobp
ID: 39930384
Actually run a macro to create a file.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 38

Expert Comment

by:Hypercat (Deb)
ID: 39930430
To open the database and run a macro, you need to add the following to the end of the command:  /x [macroname]
0
 

Author Comment

by:cobp
ID: 39930452
Can you give me the example ?
0
 

Author Comment

by:cobp
ID: 39930476
Would this be it ?

START [serverpath]\databasename.mdb /x Autoexec
0
 
LVL 38

Accepted Solution

by:
Hypercat (Deb) earned 500 total points
ID: 39934272
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now