A module is a collection of Visual Basic declarations and procedures that are stored together as a unit.
Object box
Procedure box
Declarations
Procedures
Procedure View button
Full Module View button
Form and report modules are class modules that are associated with a particular form or report. Form and report modules often contain event procedures that run in response to an event on the form or report. You can use event procedures to control the behavior of your forms and reports, and their response to user actions, such as clicking a command button.
When you create the first event procedure for a form or report, Microsoft Access automatically creates an associated form or report module.
To view or add a form procedure, choose one of the form's objects from the Object box ...
... and then choose an event from the Procedure box. Names of events that already have procedures are bold.
Procedures in your form and report modules can call procedures you have added to standard modules.
In Access 97 or later, class modules can also exist independent of a form or report, and this type of class module is listed in the Database window. You can use a class module to create a definition for a custom object. In Access 95, class modules exist in association only with a form or report.
Standard modules contain general procedures that aren't associated with any other object, and frequently used procedures that can be run from anywhere within your database. The major difference between a standard module and a class module that is not associated with a particular object is one of scope and lifetime. The value of any variables or constants that are declared or exist in a class module without an associated object are available for use only while that code is running and only from that object.
Function name and arguments
Visual Basic declarations and code statements
Standard modules are listed in Modules under Objects in the Database window. Form, report, and standard modules are also listed in the Object Browser.