Summary
You can take control of Access by creating macros and by writing Visual Basic for Applications (VBA) code. Unlike other Office applications, such as Excel and Word, Access doesn't have a macro recorder that you can use to create macros. Instead, you create an Access macro by selecting a sequence of predefined actions. The principal advantage of macros is that you can create them easily and quickly. Among their disadvantages are their limited capabilities and the fact that you can't control what happens when a runtime error occurs.
Access shares VBA with the other major Office applications. You can use VBA to create procedures that control almost every aspect of Access. Event procedures respond to events that occur while an application is running. These events include a form or report opening or closing, a command button on a form being clicked, text on a form being entered or changed, and a keyboard key being pressed. In addition to event procedures, you can create custom procedures that can be called from other procedures.
An important use of VBA procedures is to trap runtime errors so that a meaningful error message is displayed when a runtime error occurs and so that users can take whatever action is necessary to correct the error.
There are many things you can do to optimize an Access application. Primarily, you should make sure that the computer running the application has an adequate amount of memory, a sufficiently fast processor, and a high-performance disk system. You should use the Performance Analyzer utility that's supplied with Access to see suggestions about how the performance of applications you've created might be improved.