Microsoft Office Tutorials and References
In Depth Information
Understanding Objects and Collections
Figure 4-6:
Collections
are
everywhere
in Access.
Working with properties, methods, and events
All objects have some combination of properties, methods, and events. Objects
in the real world as well as objects in Access have properties, methods,
and events. You can describe a car in terms of its properties (make, model,
size, color, and so on), methods (you drive a car), and events (you press the
brake pedal, which causes a series of actions that slow the car). Getting back
to Access, those terms are defined as follows:
Property: A property of an object (or collection) is some characteristic of
that object, such as size, color, or font.
Method: A method is something that you can do to the object. Every form
has an Open method and a Close method because you can open and
close forms. (The DoCmd object that we mention earlier in this chapter
provides access to the methods provided by most Access objects.)
Event: An event is something that happens to an object. When you click
a button on a form, you trigger its On Click event (or Click event).
Virtually everything in Access is an object that has properties, methods, and
events. If you open a form in Design view, you can click any control to see
its properties in the property sheet. If the property sheet isn’t open, press
Alt+Enter, or right-click a control and choose Properties from the contextual
menu.
Search JabSto ::




Custom Search