Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 24: Optimizing Access Applications


847


contain no source code) and always keep their modules in a compiled state. Because the code is
always in a compiled state, less memory is used by the application, and you suffer no performance
penalty for code being compiled at runtime.

In addition to not being able to view existing code because it’s all compiled, the following restric-
tions apply:

l You can’t view, modify, or create forms, reports, or modules in Design view. You can,
however, create and modify tables and queries in an .accde file.
l You can’t add, delete, or change references to object libraries or databases.

l (^) You can’t change your database’s VBA project name by using the Options dialog box.
l You can’t import or export forms, reports, or modules. Note, however, that tables, queries,
and macros can be imported from or exported to non-.accde databases.
Tip
If you want to create a demo of your application — and if you don’t want the users to be able to see your code
or form and report designs — you should create an .accde file. Because the designs of your forms, reports,
and all code modules are simply not present (they’re stored in a compiled version only), you don’t have to
worry about someone stealing or even modifying your designs and code. An .accde file is also good for dis-
tributing your work in environments where you don’t want the user to change your designs.
Because of these restrictions, it may not be possible to distribute your application as an .accde
file. For example, if your application creates forms at runtime, you wouldn’t be able to distribute
the database as an .accde file.
Caution
You have no way to convert an .accde file back into a normal database file, so always save and keep a copy
of the original database! When you need to make changes to the application, you must open the normal data-
base and then create a new .accde file before distribution. If you delete your original database, you won’t be
able to access any of your objects in Design view.
To create an .accde file, follow these steps:



  1. Save and close all the database objects.


If you don’t close these objects, Access tries to close them for you, prompting you to save
changes where applicable. When working with a shared database, all users must close the
database; Access needs exclusive rights to work with the database.


Tip
Since Access can’t convert an application into an .accde if it can’t compile it, you may want to compile your
application first.



  1. Select the Make ACCDE command on the File menuShare ribbon (refer to Figure 24.2).


The Save As dialog box appears.

Free download pdf