This article was previously published under Q289885
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb).
For a Microsoft Access 2000 version of this article, see 254372.
This article provides an overview of how you can help protect a database so thatit is not changed or copied by other Microsoft Access users.
This article assumes that you have a thorough understanding of the piecesthat make up the Microsoft Access security model: workgroups, accounts,ownership, and permissions.
When you are creating a database, there are three common mistakes that enable Access users to circumvent security:
You create the database and its objects while you are logged on as the Admin user.
You do not remove the default Users group permissions that are granted in full for all objects.
Your distributed application includes the same System.mdw file that was used to create the database. In the System.mdw, the Admin account has no password and is a member of the Admins group.
To protect your database from being changed by other Microsoft Access users, follow these steps:
Start Microsoft Access, and then open any database.
On the Tools menu, point to Security, and then click Workgroup Administrator. Create a new system database (System.mdw) that has a unique name, organization, and workgroup ID.
On the Tools menu, point to Security, and then click User and Group Accounts. Click the Change Logon Password tab, assign a password to the Admin user account, and then click Apply.
In the User and Group Accounts dialog box, click the Users tab. Create a new user account, and then add the account to the Admins group.
In the Name box under User, select the Admin user name. Remove the Admin account from the Admins group, and then click OK.
On the File menu, click Exit. Restart Microsoft Access.
Create a new database.
After you have named the new database and clicked OK, the Logon screen appears.
Note that this is different from earlier versions of Access, where the Logon screen appears before Access starts.
Type the name of the user that you created in step 4. Leave the password blank.
On the Tools menu, point to Security, and then click User and Group Accounts.
Click the Change Logon Password tab, type a password, and then click OK.
On the Tools menu, point to Security, and then click User and Group Permissions. Click the Permissions tab, and then select Groups under the List options to display the group names in the User/Group Name box.
In the User/Group Name box, click Users. Select the appropriate object type in the Object Type box to display the various objects in the Object Name box, and then remove the default Users group permissions for the following objects that appear in the Object Name box:
Import all of the objects from your original database into the new database.
Create other group and user accounts as necessary.
Assign group and user permissions to your objects as appropriate.
Optional: Close the database, and then use the Encrypt/Decrypt Database command (click Tools, and then point to Security) to encrypt the database. (This step is optional.)
For additional information about how to protect the Visual Basic Environment, click the following article number to view the article in the Microsoft Knowledge Base:
223447 ACC2000: Can't Secure Individual Modules in Access 2000
For more information about how to secure a database in Microsoft Access, click Microsoft Access Help on the Help menu, type secure an Access database in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.
For more information about setting user-level security, click Microsoft Access Help on the Help menu, type secure an access database by using the user-level security wizard in the Office Assistant or the Answer Wizard, and then click Search to view the topic.