Article ID: 161016 - Last Review: January 19, 2007 - Revision: 3.4 ACC: How to Use DAO to Open Password-Protected Database (95/97)This article was previously published under Q161016 SUMMARYModerate: Requires basic macro, coding, and interoperability skills.
This article shows you how to use the OpenDatabase method to open a Microsoft Access database that has a database password. Note that this is different from opening a database that is secured with the Microsoft Access user-level security feature. This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual. MORE INFORMATION
If you want to use the OpenDatabase method to open a password-protected
database, specify the database password as part of the Connect argument.
The syntax to open a database with the OpenDatabase method is as follows:
When you use the OpenDatabase method to open a password-protected Microsoft Access database, the Connect argument of the OpenDatabase method requires the following syntax:
"MS Access;pwd=<password>"
The following example uses the OpenDatabase method to open the sample
database Northwind.mdb, which is protected with a database password of
"northwind."
CAUTION: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and perform these steps on a copy of the database.
REFERENCES
For more information about the OpenDatabase method, search the Help Index
for "OpenDatabase method."
For more information about database passwords, search the Help Index for "passwords, database," or ask the Microsoft Access 97 Office Assistant. | Article Translations
|

Back to the top
