Using Access Collections and Objects

Earlier in this chapter, you briefly explored the difference between an object and a collection. To recap, collections can contain multiple objects. For example, you might use a forms collection to loop through all forms in the project, whereas you would refer to a particular form object when you want to deal with that specific form only.

Now that you have mastered the basics concepts of object-oriented programming and understand that objects are different from collections, let's look at some of the most useful collections and objects that come with Access. The examples in this section are by no means an exhaustive list, but they provide you with the most common collections. A complete list can be obtained in the Visual Basic help documentation from the Visual Basic Editor.

The Application object is at the top of the Access object model and refers to the active Access application. It contains all other objects and collections. The Application object contains several child objects that are very useful. Several Application object examples will now be described.

0 0

Post a comment