Microsoft KB Archive/289885

= Description of how to help protect a Microsoft Access database =

Article ID: 289885

Article Last Modified on 1/26/2005

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



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.



SUMMARY
This article provides an overview of how you can help protect a database so that it is not changed or copied by other Microsoft Access users.

This article assumes that you have a thorough understanding of the pieces that make up the Microsoft Access security model: workgroups, accounts, ownership, and permissions.



MORE INFORMATION
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.</li> 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.</li> Type the name of the user that you created in step 4. Leave the password blank.</li> On the Tools menu, point to Security, and then click User and Group Accounts.</li> Click the Change Logon Password tab, type a password, and then click OK.</li> 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.</li> 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:

<Current Database>

<New Tables/Queries>

<New Forms>

<New Reports>

<New Macros>

</li> Import all of the objects from your original database into the new database.</li> Create other group and user accounts as necessary.</li> Assign group and user permissions to your objects as appropriate.</li> 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.)</li></ol>

<div class="references_section">