Solved

Windows 7 task scheduler not firing off with Access.

Posted on 2014-03-14
8
855 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

760 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