Creating a Class Module for a Form or Report

Similar to the standard modules that you create, you can also create class modules with the Visual Basic Editor. You usually begin a class module in Design view for a form or report. In most cases, class modules are associated with events such as clicking a form button or opening the form. Unlike standard modules, class modules do not appear in the Modules Object list in the Database window. Instead, you can access them from within the Project Explorer.

Create a Class Module for a Form or Report


Display a form or report in Design view.


Click the control or object within the form or report in which you want to create a class module, and then click the Properties button on the toolbar.


Click the Event tab.


Click the event box that you want to associate with a VBA procedure.


Click the Build button.


Click Code Builder.

graphics/7_icon.jpg Click OK.

The Visual Basic Editor opens a Modules window and automatically creates an Event procedure for the control and event you selected.


Enter the VBA commands you want.


Show Me Microsoft Office Access 2003
Show Me Microsoft Office Access 2003
ISBN: 0789730049
EAN: 2147483647
Year: 2002
Pages: 318 © 2008-2017.
If you may any questions please contact us: