Beginning Access 2002 VBA (Programmer to Programmer)

Events are vitally important to Windows and Access. As developers we quickly learn how to build event handlers in forms for the various form and control events we use to customize our forms and, by now, events are probably old hat.

What we have done in this chapter is taken event handling to the next level and shown you how to sink events directly in a class of your own making. This ability combined with your evolving knowledge of classes will undoubtedly make you a better programmer. Class objects allow you to encapsulate behaviors and properties for objects so that you can use these behaviors throughout your system with just a few simple lines of code to instantiate the class.

We have learned how to:

As you've seen, this is mostly just an extension of information you learned in earlier chapters. You already know how to handle events generated by objects, and how to build classes. This chapter simply put the two concepts together and showed how to handle events in any class you want rather than only in form classes. However it truly is a revolutionary step for most developers, giving them the power to do things that simply weren't possible before.

 

Категории