Solved

Scheduled task run Access app

Posted on 2011-02-25
6
885 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

737 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