Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Scheduled task run Access app

Posted on 2011-02-25
6
Medium Priority
?
895 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 85
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 85
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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

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 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

927 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