Compartilhar via


Protecting an Access Solution

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

There are several reasons why it may be important to protect the data and features in an Access solution. For example, your solution may use objects that took you a great deal of time to design. Perhaps you or the users of your solution need to control access to sensitive information. Or, to reduce maintenance for your solution, you may want to prevent users from inadvertently breaking your solution by changing code or objects on which the solution depends. Consider implementing some form of security to control what a user, or group of users, can do with the objects and data in your solution.

Access provides four methods of protecting your solution. All of these methods apply to .mdb files, and some of these methods also apply to .adp files. The most powerful and flexible method of protecting the data and objects in an .mdb file is called User-Level security,**which is discussed later in this chapter. However, establishing and maintaining User-Level security is a relatively complex process that may exceed your situation's requirements. As alternatives or adjuncts to User-Level security, Access provides the following three methods you can use to protect your solution:

  • Using startup options to restrict access to default menus and toolbars, the Database window, and special keys (both .mdb and .adp files)

  • Setting a password to control opening the database (.mdb only)

  • Saving your solution in a format that removes Microsoft Visual Basic source code and prevents changes to the design of forms, reports, and modules (both .mdb and .adp)

Access also provides database encryption for .mdb files that you can use to prevent unauthorized users from viewing the objects in your solution with a disk editor or other utility program. You can use encryption in conjunction with all methods of protecting your Access database solution.

The strategy you use depends on how your solution will be used and the extent of security required to protect its objects. The following sections discuss these options.

****Note   ****You can also use the security features of your operating system to control access to .mdb, .adp, and data access page files. For more information about how to do this, see "Using File-System Access Control to Protect Access to Documents" in Chapter 17, "Securing Office Documents and Visual Basic for Applications Code."