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," will start you on the next leg of your programming journey by introducing the Windows API and the many built-in functions that the Windows operating system can offer in terms of advanced programming functionality.

0 0

Post a comment