Chapter 24: Optimizing Access Applications
851
Caution
When you change a project name (but not the filename), the entire application loses its compiled state.
Because of this, you should change the project name only if absolutely necessary, and you should compile your
database immediately after making the change.
Distributing applications in a compiled
or uncompiled state
When distributing your Access application, you need to take several issues into consideration.
Distributing source code for your application
First and foremost, if you distribute source code and allow users to modify or add objects, you
must make the users aware of the compilation issues. If your users don’t fully comprehend what’s
happening with the application’s compiled state, you can be sure that you’ll receive complaints that
the application is getting slower and slower over time.
Putting an application in an uncompiled state
If your application is the type that will be frequently changing its compiled state (due to creating
forms and reports dynamically), or if end users will often make changes to the application’s
objects, or if distributed file size is an issue, you may want to consider distributing the database in
a fully uncompiled state.
Follow these steps to put an application into an uncompiled state:
- Create a new database.
- Import all your application objects into the new database.
- Compact the new database.
In the “Using the decompile option” section, later in this chapter, I tell you how to decompile the
project manually.
Storing commonly used code in a library
After your application is finished and ready for distribution, you may want to consider placing all
commonly used code into a library database (an external database referenced by an Access applica-
tion database). A slight performance overhead is incurred by calling library code rather than
accessing it directly in the parent application, but the library code will never be put into a decom-
piled state. This technique can greatly increase an application’s performance and keep the perfor-
mance relatively consistent over time.
The first step for using an external library is to create an external database and import all the appli-
cation’s code modules.