Solved

Run scheduled task with Access Database that has a password

Posted on 2011-09-14
3
446 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
View vs Edit mode enhancements 12 40
Run Time Error 3075 15 44
Access 2010 db.Execute using dbFailOnError and dbSeeChanges 10 48
format date field on certain entries 8 28
This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
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 …

910 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now