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

Hour 23. VBA Introduced > Access Class Modules, Standard Modules, Form Modules,...

Access Class Modules, Standard Modules, Form Modules, and Report Modules

You write VBA code in units called subroutines and functions that you store in modules. Microsoft Access modules are either Standard modules or Class modules. You create Standard modules by selecting the Modules icon in the Database window and then clicking New. Standard modules contain libraries of subroutines and functions. Class modules can be standalone objects, or they can be associated with a form or report. To create a standalone Class module, you choose Insert | Class Module. Whenever you add code behind a form or report, Microsoft Access creates a Class module associated with that form or report that contains the code you create.


Modules specific to a form or report are generally called Form and Report Class modules, and their code is often referred to as Code Behind Forms (CBFs). Access creates and stores CBF in that form or report and triggers the code within it from events occurring within the form or report.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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