12.5. Summary

In this chapter, we gave you a whirlwind tour of the OOP techniques that are made available in Access 2003. If you had any trouble understanding the concepts presented, be consoled by the fact that it may just take a little practice. You should be confident in that before long, you'll be writing quite complex object-oriented code that will make your application development and maintenance a joy to behold.

Specifically in this chapter, we looked at class modules, how they differ from object instances, and when you would use object-oriented techniques in your applications. We created several classes of our own, designed their properties and methods, and instantiated the classes as objects to investigate how they work and how to use them.

We talked about the object-naming strategy, and then examined class events and errors, to understand how classes communicate with the outside world.

We practiced using forms and reports as objects, a technique which we hope you will find useful in the future. We next examined collection classes, which is the basis for building your own object models, and included an advanced technique for specifying an object's Item property.

Finally, we hopefully put this chapter into a wider context by introducing some basic object-oriented theory, and then demonstrating how to implement some of it in code. With that, along with the preceding chapters, we have now gone as far as standard VBA can take us. The next chapter, "Extending VBA with APIs," ...

Get Access 2003 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.