Solved

Scheduled task run Access app

Posted on 2011-02-25
6
881 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

770 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