ACC2000: Can't Use /Pwd Option with Password-Protected Database

This article was previously published under Q207891
This article has been archived. It is offered "as is" and will no longer be updated.
Moderate: Requires basic macro, coding, and interoperability skills.

For a Microsoft Access 2002 version of this article, see 292302.
When you try to start Microsoft Access by using the /pwd command-line option to open a database that is password-protected, the Logon dialog box is displayed, even if you supply the correct password.
The /pwd option is used to provide the user-level security accountpassword, not the database password.
In order to use the /pwd command-line option to start Microsoft Access, implement User-Level Security.
More information
Microsoft Access offers two ways to protect a database with a password:
  • Database password - to control who can open a database.
  • Security Account password - to verify users when they log on to a workgroup.
The database password can prevent unauthorized users from opening aparticular database. When you set a database password, all users must typethat password before they can open the database. However, after thedatabase is open, there are no security restrictions on what operations auser can perform in that database.

The Security Account password is used when you define user-level securityfor a workgroup. With user-level security, you must type a username and apassword to open a database. After the database is open, your usernamedetermines the type of access you have to each object in the database.

When you use the /pwd command-line option, it always applies to a Security Account password.

You may also see this behavior if you are using user-level security and you do not supply the correct user-level password. In this case as well, you do not receive an error message.

Important: Please make sure you are using the correct case as well. If, for instance, you have assigned the password "oneSock" to yourself, then you try using the the password "onesock" with the /pwd command-line option, Access prompts you for the password and you receive no error.

Steps to Reproduce the Behavior

  1. Open the sample database Northwind.mdb for exclusive access.
  2. On the Tools menu, point to Security, and then click Set Database password.
  3. Type Northwind in the Password box and in the Verify box.
  4. Click OK to close the Set Database Password dialog box.
  5. Close the database and quit Microsoft Access.
  6. Start Microsoft Access with command-line options to open the Northwind database and send the password. To do so, follow these steps. Note that the command line in the following example uses the default installation path for Microsoft Access files; substitute the path to Msaccess.exe and Northwind.mdb on your hard drive.
    1. Click the Windows Start button, and then click Run.
    2. In the Run dialog box, type the following line in the Open box, and then click OK:
      "c:\program files\microsoft office\office\msaccess.exe" "c:\program files\microsoft office\office\samples\northwind.mdb" /pwd northwind
  7. Note that Microsoft Access displays the user-level security Logon dialog box even though you provided the database password on the command line.
To remove the database password from the Northwind database, follow thesesteps.
  1. Open the sample database Northwind.mdb for exclusive access.
  2. In the Password Required dialog box, type Northwind, and then click OK.
  3. On the Tools menu, click Security, and then click Unset Database Password.
  4. Type Northwind in the Password box, and then click OK.
  5. Close the database and quit Microsoft Access.
For more information about the differences between security accountpasswords and a database password, click Microsoft Access Help on the Help menu, type Protecting a Microsoft Access database in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

For more information about command-line options, click Microsoft Access Help on the Help menu, type Startup command-line options in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
209207 ACC2000: How to Use Command-Line Switches in Microsoft Access
can t cannot

Article ID: 207891 - Last Review: 10/26/2013 05:43:00 - Revision: 3.0

Microsoft Access 2000 Standard Edition

  • kbnosurvey kbarchive kbprb kbui KB207891