O'Reilly logo

Special Edition Using Access 97, Second Edition by Roger Jennings

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the Role of Class Modules

Class modules, which were introduced by Visual Basic 4.0, are containers for VBA code that relate to a particular class of objects. Access 97 defines two classes (collections)—Forms and Reports—that contain VBA code for a particular instance of the class: a Form or Report object, respectively. In object-oriented programming terms, class modules encapsulate VBA code within a Form or Report object. Code encapsulation lets you create reusable objects. For example, when you copy a form from one Access database to another, the copy you make includes the code in the form's class module.

Access's Form and Report class modules differ from conventional modules in that a Form or Report object is integral to the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required