O'Reilly logo

Beginning Access™ 2007 VBA by Denise Gosnell

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

13.4. Building the Class Modules for the Objects

Throughout this book you learned that VBA code can be written in various places, such as class modules that are independent or associated with a form, as well as in standard modules. Next, you turn your attention to writing the code that will implement the desired features of the Project Tracker application. You will be creating the custom class modules first, then the standard modules, and finally the code for the forms to call the other modules. An example of how the Project Explorer will look in the Visual Basic Editor when you're finished is shown in Figure 13-23.

Figure 13.23. Figure 13-23

Chapter 4 introduced the idea of creating custom classes. In the current application, you will create two logical custom class modules. One is a class for a Project object that will represent the current project in memory on the Project Tracker screen. The other will be a Contact object that will represent any current contact in memory from the Contacts screen.

13.4.1. The Project Class

An object diagram for the Project class is shown in Figure 13-24.

The Contact class will be illustrated later in this chapter.

Figure 13.24. Figure 13-24

The properties are represented in the top portion of the diagram, and the methods are shown in 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