• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 22. Understanding Visual Basic F... > Understanding Class Modules

Understanding Class Modules

Whenever you create event procedures behind a form or report, you’re creating a class module. A class module is the specification for a user-defined object in your database, and the code you write in the module defines the methods and properties of the object. Of course, forms and reports already have dozens of methods and properties already defined by Access, but you can create extended properties and methods when you write code in the class module attached to a form or report.

You can also create a class module as an independent object by selecting the Database window and choosing Class Module from the Insert menu. In the LawTrack Contacts sample database (Contacts.mdb), you can find a class module called ComDlg that provides a simple way to call the Windows open file dialog box from your Visual Basic code.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint