3.1. Elements of an Object

Objects are all the things that make up your Access database, such as forms, reports, modules, macros, and tables. Each object has properties that determine its behavior or appearance, as well as methods that determine which actions can be taken upon it. Objects also respond to events that are triggered by actions taken by the user or caused by the system.

Some people tend to confuse a collection with an object. A collection comprises multiple objects. Thus, an object can be a member of a collection. Sometimes you may want to manipulate a specific object (for example, a particular form), whereas other times you may want to manipulate a collection of objects (all the forms in your database). Let's now turn to some of the most important concepts in the object-oriented programming world: properties, methods, and events.

3.1.1. What Is a Property?

Properties are characteristics of an object that determine its behavior or appearance. Examples of properties include the name, caption, or size of a control. Figure 3-1 shows various properties of a Form. This dialog box can be displayed when the Form is in design view and you select the Design ribbon Property Sheet or press Alt+Enter. Note that some of the properties listed in the figure have selectable Yes/No values, some are text input fields like the Caption property, and others have different choices you ...

Get Beginning Access™ 2007 VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.