Solved

Run scheduled task with Access Database that has a password

Posted on 2011-09-14
3
525 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
[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 Comments
 
LVL 85

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

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.
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.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

635 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