Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 605
  • Last Modified:

Run scheduled task with Access Database that has a password

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
mcs26
Asked:
mcs26
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
plummetCommented:
Hi MCS,

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

Cheers
0
 
Jeffrey CoachmanMIS LiasonCommented:
...What kind of password system are you using?

Access' built in password utility? ... or is this something you made on your own?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now