Why This Chapter Is Important
Access 2003 offers two types of modules :
Standard modules and Class modules. Access 95 introduced Class modules for forms and reports, but Access 97 was the first version of Access to offer the capability to create standalone Class modules.A Class module is similar to a Code module. The subroutines and functions in the Class module become the methods of the class. The Property Let and Property Get routines become the properties of the class, and the Class module's name becomes the name of the custom object. A Class module is a great way to encapsulate related functions into a portable, self-contained object. Class modules can help you simplify the process of performing the following tasks:
- Manipulating databases and recordsets
- Calling Windows API functions
- Performing low-level, file-handling tasks
- Accessing and modifying the registry
If you regularly open databases and recordsets and traverse those recordsets by using code, you might decide that you want to simplify these tasks. By building Class modules, you can more easily access table data.