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

Last reviewed: May 21, 1997
Article ID: Q161177
The information in this article applies to:
  • Microsoft Access versions 7.0, 97

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you try to start Microsoft Access 7.0 or 97 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.

CAUSE

The /pwd option is used to provide the user-level security account password, not the database password.

RESOLUTION

Only use the /pwd command-line option to supply the user-level security account password.

MORE INFORMATION

Microsoft Access offers two way 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 a particular database. When you set a database password, all users must type that password before they can open the database. However, once the database is open, there are no security restrictions on what operations a user can perform in that database.

The security account password is used when you define user-level security for a workgroup. With user-level security, you must type a username and a password to open a database. Once the database is open, your username determines 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.

Steps to Reproduce 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. The sample command line below uses the default installation path for Microsoft Access 97 files; substitute the path to Msaccess.exe and Northwind.mdb on your hard drive.

    NOTE: In the following command-line sample, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of each line, and type the entire command as a single line.

    In Microsoft Windows 95 and Microsoft Windows NT version 4.0:

        a. Click the Start button, and then click Run.
    

        b. 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
    
       In Microsoft Windows NT version 3.51:
    
        a. In Program Manager or File Manager, click Run on the File menu.
    
        b. In the Run dialog box, type the following line in the Command Line
           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 these steps.

  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.

REFERENCES

For more information about the differences between security account passwords and a database password, search the Help Index for "user accounts, passwords," or ask the Microsoft Access 97 Office Assistant.

For more information about using command-line options to start Microsoft Access, search the Help Index for "command-line options," or see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q105128
   TITLE     : ACC: How to Use Command-Line Switches in Microsoft Access
 

	
	


Keywords : kbui UifProb
Version : 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.