Password-protecting a database in
Microsoft Access prevents unauthorized
users from viewing or modifying your
data. For example, let's say you're
putting together a quarterly company
spending report. Chances are, you don't
want very many people knowing how much
money goes in and out each month. By
password protecting this database, you
can ensure that this information is
secured and that only you and other
managers have access to it.

This article will show you how to
protect your sensitive information from
prying eyes, including adding and
removing a password, and opening a
protected database.

Assigning a password

In order to assign a password to a
Microsoft Access database, the first
thing you need to do is make sure the
database you want to secure is closed.
If the database is shared on a network,
make sure all other users have closed
the database as well.

Next, open the database that you want to
secure using the Open Exclusive command.
Select File > Open from the menu and
navigate to where the database you want
to open is stored. Select the database
you want to open, click the Open button
list arrow, and select Open Exclusive
from the list.

(View a screen shot of this on the
right.)

Once the database has been opened
exclusively, select Tools > Security >
Set Database Password from the menu. The
Set Database Password dialog box
appears.

Enter a password in the Password text
box, and then enter it again in the
Verify text box. Passwords are
case-sensitive, so make sure that the
Caps Lock command hasn't been turned on
by mistake.

The text you type in the Set Database
Password dialog box appears as a string
of *****'s. This ensures that a passing
coworker can't see your password.

Before you set your password, it is
important to note that if you lose or
forget your password, it can't be
recovered. To make sure that you never
get locked out of your own data, keep
your password in a safe place so that it
can be retrieved later on if need be.

Once you are satisfied with your
password, click OK.

Opening a protected database

Once you have password-protected a
database, it's a good idea to try and
open it just to make sure everything has
been set up correctly.

First, close the password-protected
database. Then try and open the database
as you would normally (you don't have to
use the Open Exclusive command).

As soon as Access opens the
password-protected database, the
Password dialog box appears. You must
enter the correct password here in order
to gain access to the database.

For the sake of this article, try
entering an incorrect password into the
Password text box and then click OK. An
error message should appear, telling you
that the password you entered was
incorrect. Click OK to try again.

(continued on right...)

quick jump

Jump to other stories through these
links:

[http://www.appliedoffice.net/news/2006-sep/news contents.htm]

...continued

This time, enter the correct password
into the Password text box and click OK.
The database should open without a
hitch.

Removing a password

In order to remove a password from a
database, you must have access to it: if
you don't know the password to begin
with, you can't remove it.

Select File > Open from the menu and
navigate to where the database is
stored. Select the database that is
secured by the password you wish to
remove, click the Open button list
arrow, and select Open Exclusive from
the list.

An error message appears if you don't
open the database exclusively.

In the Password Required dialog box that
appears, enter the database password and
click OK. Remember that passwords are
case-sensitive, so make sure you don't
have the Caps Lock command turned on by
mistake.

It's important to note that anyone you
give your password to has the ability to
change or remove the password. Keep this
in mind when deciding who should be
granted access to the database.

More Complex Password Options

Through the Security menu, you can set
user-based or group-based permissions on
every single object in your Access
database. You can say which users
can access which forms, reports, and
tables, and if that access is read-only,
add-only, edit, or more.

If you are interested in locking down
your database to this level, let me know
and I'll help you out or write an
article on it.

screen shots

The following screen shot(s) illustrate
this article. Click on
one for a larger view.