Part IV: Professional Database Development
854
End If
Next ref
ExitHere:
Exit Function
HandleError:
MsgBox Err & “: “ & Err.Description
ReferenceFromFile = False
Resume ExitHere
End Function
With the References collection, the primary concern of using and distributing libraries — losing
references upon distribution — is now gone. However, library databases still have one major draw-
back: Access libraries don’t support circular references. This means that the code in your library
databases can’t reference variables or call procedures that exist in your parent database.
Whether you distribute your application as one database or as a primary database that uses library
databases, if your applications are static (they don’t allow modification of objects by end users or
wizards and don’t perform object modifications on themselves), you should always distribute the
databases in a fully compiled state so that your users experience the highest level of performance.
Improving Absolute Speed
When discussing an application’s performance, the word performance is usually synonymous with
speed. You’ll find two types of speed in software development:
l Absolute: Absolute speed is how quickly your application performs a function, such as
running a certain query. Absolute speed can be measured in units of time.
l Perceived: Perceived speed is how end users perceive an application’s performance. This
phenomenon of perceived speed is often the result of visual feedback provided to the user
while the application performs a task. Whereas absolute speed can be measured, per-
ceived speed is very subjective. (For more on perceived speed, see the “Improving
Perceived Speed” section, later in this chapter.)
Among the most important steps for increasing absolute speed are the following:
l Keeping your application in a compiled state: As was discussed in the “Distributing
.accde Files” section, converting your .accdb file to an .accde file is a good way to
ensure that the code is always in a compiled state.
l (^) Organizing your procedures into “smart” modules: As was discussed in the
“Understanding Module Load on Demand” section, separating procedures into modules
based on how frequently they’ll be used is a good approach.
l Opening databases exclusively: You should always open a database exclusively in a
single-user environment. If your database is a standalone application (meaning that nothing
is shared over a network), opening the database in exclusive mode really boosts perfor-
mance. If the database runs on a network and is shared by multiple users, the database