Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to schedule Access program in Task Scheduler in Windows 7

Status
Not open for further replies.

shanl

Technical User
Apr 2, 2007
41
US
I am on OS 2003 and have been running our Access programs in "Scheduled Tasks" scheduler for years with no problem. We are migrating to Windows 7 in a couple weeks and in testing whether we can run our Access on Windows 7 in the Task Scheduler I am having problems getting it to run. It's almost as though I need to launch Access first and then the program but when I do that it seems to launch Access and never gets to the Access program. I have been unable to find the right combination. Is there anyone using the Task Scheduler that can show me an example of how you've gotten it to execute your Access program?. Did you need to launch Access prior to the program?
I'm beginning to wonder whether I need to a a command line switch to lauch access and then point to the program.
Under Program/script: c:\program files\Microsoft office\Office14\mSaccess.exe
Under Start in: S:padappstest\crcp.accdb

Ideas? Any help is appreciate. Thanks in advance.
Shan
 
You might be on to something? How can I tell?
At one time I copied the Access Program to the C: drive to see if it had to be on the same computer that it was scheduled from but got the error %1 is not a valid Win32 application. Lateley I'm wondering if the task scheduler will only run certain types of files. I know it will run .exe and .bat files so perhaps I need to create a .bat file and put some start commands there. But before I go down that road, perhaps its something easy like making it a trusted connection. If you can tell me how to tell I'll pursue this.

Shan
 
In the Program/Script area, do you put ONLY the name of the executing program or do you also include the path too since you are also including the path in START IN.
S:\pdappstest\crcp.accdb or just crcp.accdb?
 
The scripts I write have a line like:
Code:
strUserLogin = WshShell.ExpandEnvironmentStrings("%USERNAME%") 
wshshell.Run "C:\Users\" & strUserLogin & "\app_folder\app_File.accdb"


Duane
Hook'D on Access
MS Access MVP
 
i've been trying to work around some issues with windows task schedulerer in windows 7 as well. I have found that for a network drive, I need to put the entire pathname "\\server\folder\db.mdb" and creating an Autoexec macro to run when the dB is opened. I hate doing that, but that's the only way I got it to actually run the access database update. I even tried using a script (.vbs) but that didn't work either. oh, and forget about checking the "run even if user isn't logged on" it seems as if I check that, not only does the access db run in the background, a normal 10 minute update takes HOURS...not sure how many cuz I end up canceling the job.

Sandy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top