About MDE files (MDB)

If your database contains Microsoft Visual Basic for Applications (VBA) (Visual Basic for Applications (VBA): A macro-language version of Microsoft Visual Basic that is used to program Windows applications and is included with several Microsoft applications.) code, saving your Microsoft Access database (database: A collection of data related to a particular subject or purpose. Within a database, information about a particular entity, such as an employee or order, is categorized into tables, records, and fields.) as an MDE file compiles all modules, removes all editable source code, and compacts the destination database. Your Visual Basic code will continue to run, but it cannot be viewed or edited. Your database will continue to function as it did — you can still update data and run reports.

Saving your Access database as an MDE file does not prevent changes to the database design. However, you will notice the following:

  • The user interface for modifying or creating forms, reports, or modules will be disabled.
  • The VBA References dialog box will not allow adding, deleting, or changing references to object libraries or databases.
  • The source code will not be available.
  • The importing and exporting commands will be disabled for forms, reports, or modules. However, tables, queries, data access pages, and macros can be imported from or exported to non-MDE databases.

ShowConsiderations if you need to modify the design of forms, reports, or modules

Be sure to keep a copy of your original Access database. If you need to modify the design of forms, reports, or modules in an MDE file, you must modify the original Access database, and then resave it as an MDE file. Saving an Access database containing tables as an MDE file creates complications reconciling different versions of the data if you need to modify the design of the forms, reports, or modules at a later date. For this reason, saving an Access database as an MDE file is most appropriate for the front-end database of a front-end/back-end application (front-end/back-end application: A database application consisting of a "back-end" database file that contains tables, and copies of a "front-end" database file that contain all other database objects with links to the "back-end" tables.).

ShowCode no longer employs user-level security

ShowConsiderations before saving your database as an MDE file

Some restrictions may prevent you from saving your Access database as an MDE file:

Additionally, if you define a database password or user-level security before saving an Access database as an MDE file, those features will still apply to an MDE file created from that database. If your Access database has a database password or user-level security defined, and you want to remove these features, you must do so before saving it as an MDE file.

To save an Access database that employs user-level security as an MDE file, you must meet the following requirements before you can proceed:

ShowAbout references and MDE files

If you try to create an MDE file from a Microsoft Access database (.mdb) or an add-in (.mda) (add-in: A supplemental program that adds custom commands or custom features to Microsoft Office.) that references another Access database or add-in, Access displays an error message and doesn't let you complete the operation. To save a database that references another database as an MDE file, you must save all databases in the chain of references as MDE files, starting from the first database referenced. After saving the first database as an MDE file, you must then update the reference in the next database to point to the new MDE file before saving it as an MDE file, and so on.

For example, if Database1.mdb references Database2.mdb, which references Database3.mda, you would proceed as follows:

  1. Save Database3.mda as Database3.mde.
  2. Open Database 2.mdb, and change its reference to point to the new Database3.mde.
  3. Save Database2.mdb as Database2.mde.
  4. Open Database1.mdb, and change its reference to point to the new Database2.mde.
  5. Save Database1.mdb as Database1.mde.

ShowAbout saving a replicated database as an MDE file

A replicated database (either a replica (replica: A copy of a database that is a member of a replica set and can be synchronized with other replicas in the set. Changes to the data in a replicated table in one replica are sent and applied to the other replicas.) or Design Master (Design Master: The only member of the replica set in which you can make changes to the database structure that can be propagated to other replicas.)) cannot be saved as an MDE file. To save a replicated database as an MDE file, you must first remove replication (replication: The process of copying a database so that two or more copies can exchange updates of data or replicated objects. This exchange is called synchronization.).

Once a database is saved as an MDE file, it can be replicated; however, replication is only recommended in situations where no further changes need to be made to the original database. If you need to make a design change to a replica set (replica set: The Design Master and all replicas that share the same database design and unique replica set identifier.) of MDE files, you must make that change in the original database, resave it as an MDE file, and then create and distribute an entirely new replica set from the new MDE file.

 
 
Applies to:
Access 2003