Solved

Run scheduled task with Access Database that has a password

Posted on 2011-09-14
3
494 Views
Last Modified: 2012-05-12
Hi,

I have scheduled tasks that run macro's in an Access database. However recently I have had to put a password on the database. The scheduled tasks cannot run anymore. How do I get around this?

Thanks,
0
Comment
Question by:mcs26
3 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 36535032
There's no way to directly open a password protected database from the commandline, so you have to build a "launcher" database that does nothing more than open your password-protected db, and then call the "launcher" database from your task.

The launcher can be nothing more than a single form database. Open that form on startup and include code like this in the Open or Load event of that form:

Dim db As DAO.Database
Set db = DAO.OpenDatabase("full path to your password-protected database", False, False, ";PWD=YourPassWord")

===================================

Here's the MS atricle about the method:
http://support.microsoft.com/kb/209953

Note the code example above also opens a Recordset, but you could of course leave out that portion of the code.

0
 
LVL 10

Expert Comment

by:plummet
ID: 36535035
Hi MCS,

How are you kicking off the tasks? I have a few ideas but it depends...

Cheers
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36537093
...What kind of password system are you using?

Access' built in password utility? ... or is this something you made on your own?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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 …

726 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