12.2. Optimizing Your Applications

As part of the testing process, you should fine-tune the application to make it run faster and better. You can apply various techniques to improve the real speed, as well as the speed as perceived by users.

12.2.1. Improving Actual Performance

The speed at which your application actually performs can be improved by applying some general design guidelines, coding techniques, and data access techniques. You will now look at each of these in turn.

12.2.1.1. General Design Guidelines

Here are several general guidelines to help improve the actual performance of your applications:

  • Minimize the code and objects in a form. Move the code to a standard module. The more complicated a form is, the longer it takes to load.

  • Minimize the use of subforms because two forms are in memory.

  • Write reusable modules that so you are not rewriting the same code in slightly different ways multiple times. This reduces the amount of code in your application and helps improve speed. For example, instead of having one procedure that enables all controls in one form, another that disables all controls in another form, and two others that disable controls in each of those same forms, write a generic module that enables or disables all controls on the specified form based on whether the enable or disable flag is passed as a variable.

  • Eliminate code that is not used.

  • Make sure that your application is compiled. Also, consider compiling your application into an ACCDE file as described ...

Get Beginning Access™ 2007 VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.