When a database is used only in one office or on a local area network (LAN) or wide area network (WAN), you have considerable control over who has access to it. But if you send the database out into the world—on its own or as part of a larger application—you lose that control. There is no way you can know who is using it or what tools they might have available to hack into it. If thinking about this keeps you awake at night, you should distribute your database as a Microsoft Database Executable (MDE) file.
Suppose the owners of The Garden Company want to make a database available for use by gardening clubs in the area, but they don’t want people to be able to change its objects and perhaps "break" things. Saving a database as an MDE file compiles all modules, removes all editable source code, and compacts the destination database. Users of the MDE file can view forms and reports and update information, as well as run queries, macros, and VBA code. They cannot do the following:
View, edit, or create forms, reports, or modules in Design view.
Add, delete, or change references to other objects or databases.
Change VBA code.
Import or export forms, reports, or modules.
Access can save a database as an MDE file only if it is in Access 2002 format. Although Access 2000 is the default format for databases created with Access 2002 and Access 2003, Access can’t save an Access 2000 database as MDE: you first have to convert it to 2002 format.
In this exercise, you will convert the GardenCo database to Access 2002 format, and then secure it by saving it as a distributable MDE file. Although The Garden Company probably wouldn’t distribute their main database to garden clubs even as an MDE file, we will use that database for this exercise. You start this exercise with the GardenCo database closed.
USE the GardenCo database in the practice file folder for this topic. This practice file is located in the My DocumentsMicrosoft PressAccess 2003 SBSSecureMDE folder and can also be accessed by clicking Start/All Programs/Microsoft Press/Access 2003 Step by Step.
Start Access.
On the Tools menu, point to Database Utilities, point to Convert Database, and click To Access 2002 – 2003 File Format.
In the Database to Convert From dialog box, navigate to the My DocumentsMicrosoft PressAccess 2003 SBSSecureMDE folder, and double-click GardenCo.
In the File name box, type GardenCo_New
, and click Save.
Click OK.
A database you can secure as an MDE file is created.
On the Tools menu, point to Database Utilities, and click Make MDE File.
In the Database To Save As MDE dialog box, navigate to the My DocumentsMicrosoft PressAccess 2003 SBSSecureMDE folder, click GardenCo_New, click Make MDE, and then acknowledge the safety warning, if necessary.
In the File name box, type TGC
, and click Save.
The process only takes a moment; no message alerts you when it is completed.
Click the Open button, navigate to the practice file folder, double-click TGC, and acknowledge the safety warning, if necessary.
Click each of the object types on the Objects bar while watching the Design button at the top of the database window.
The Design button is available for tables, queries, and macros, but unavailable for all other object types.
CLOSE the GardenCo database.