Solved

Scheduled task run Access app

Posted on 2011-02-25
6
882 Views
Last Modified: 2012-05-11
I have an access app that emails a pdf document when opened then closes.
I have it in this location: C:\Program Files\Microsoft Office\Office12\ACCWIZ
If I run it by double-clicking then it works fine but if I add it to task scheduler it just says 'running' and then does nothing.
Can any one help?
0
Comment
Question by:HKFuey
  • 3
  • 3
6 Comments
 
LVL 84
ID: 34978685
That's not the right location to your database. To run an Access database via the Task Scheduler, you should instead build a simple batch file that calls the database and use the Scheduler to call that batch file.

See this article for more information:

http://support.microsoft.com/kb/230575

Your batch file would look something like this:

@echo off
"full path to msaccess.exe" "full path to your database"

Save that as a batch file (with the .bat extension), and call that file from your Schd Task.

0
 

Author Comment

by:HKFuey
ID: 34978986
I need to put the database in ACCWIZ as otherwise I get a security message on Access startup and I need it to run unattended. (I only have Access runtime on this server, not full access)

I created the bat file and it opens the DB from that location, so I add it to a new task and nothing happens.
: (

0
 
LVL 84
ID: 34979023
Your database should be located in a Trusted Location. Generally that's the Users/Public location, and it is a very good idea to specify that the location you choose is, in fact, set to be a Trusted Location by Office. This is important, since in many cases the Program Files location is NOT a Trusted Location, and your database will NOT work if placed in that folder.

Did you review the link I supplied? There are certain caveats to insuring your Access database will run, especially insuring that the login you use has the needed permissions to actually run the program.

Also, does your Access database have a Startup form, or an AutoExec macro that will automatically launch a process (or form) when starting? If it does not, then the Access app would simply open, and do nothing else.

0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:HKFuey
ID: 34979128
I do have a form with VBA that opens automatically, runs the code, then closes the DB.

If I put the DB in Users/Public I still get the security message on open and I can't change trust settings in Runtime Access. (I changed the Macro settings in XL but it made no difference)

On the task I have tried Domain Administrator, Computer Administrator and my own login (Which has admin rights)

BTW this did work up until a couple of weeks ago, I wonder if an MS update broke it??

I have a 2003 server maybe I will install the Runtime Access on there and try again.
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 34979190
<BTW this did work up until a couple of weeks ago, I wonder if an MS update broke it??>

That would be a good starting point. I'm not sure how you'd troubleshoot that, but as a start, build a simple database that does nothing more than open a form and display something, then place that in the SAME directory and build a Task to open that test database.

If that test db works, then there's something wrong with your database.

If that test db does not work, then I'd begin to suspect issues with permissions, updates, etc.

0
 

Author Closing Comment

by:HKFuey
ID: 34980006
LSM thanks for the help, in the end I changed the task to: -

1. Run with highest privileges
2. Run only when user is logged on

Not sure which made it work but not changing it now it works (very happy!)
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

828 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