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

4.4. Summary

In this chapter, you learned how to create a Class Diagram to model the classes and their relationships. Class diagrams provide a roadmap of your code structure. Ideally, Class Diagrams should be separated into a presentation layer, business logic layer, and data access layer. The presentation layer can map to your Use Case Diagrams. The business logic layer is the heart of your Class Diagram and contains the class modules that are the heart of your application. The business logic layer calls the data access layer for any activities that need communication with the database.

You then looked at several examples of how to create properties, methods, and events for custom objects. Custom properties can be created using public variable declarations in a class module. A preferred way of creating custom properties is to write public Property Get and Property Let procedures in the class module. Property Get procedures determine what happens when the property value is retrieved, and Property Let procedures determine what happens when the property is assigned. After you write the code for a custom object, the object can be used from other class modules or procedures by declaring the object and instantiating the object. The properties, methods, and events can be accessed in the custom object from the Visual Basic Editor Code window just like existing objects. You create custom methods by adding public procedures or functions to the class module. You can also add additional ...

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