Understanding Objects
You can actually do a whole lot more with the controls on your form. Rather than just changing their content, you can also change their color, font, position, visibility, and many other details. The secret to unlocking the magic is to realize that all controls are programming objects.
In the programming world, an object is nothing more than a convenient way to group together some related features. The Description field isnât just a single value, itâs an entire text box object, and that means it has all sorts of built-in features. If you understand how text box objects work, then you have a way to get to these other features.
Note
Access invites some confusion because it uses the word object in two different ways. Throughout this book, youâve referred to all the ingredients of your database (things like tables, queries, and forms) as database objects. Programmers use the word âobjectâ in a stricter sense to refer to a programming construct that brings together related features (and thatâs how this chapter uses the term).
You can interact with objects in three ways:
Properties. Properties are pieces of information about an object. You change properties to modify the object or how it behaves. A text box object has a FontSize property that controls its text size.
Methods. Methods are actions you can perform with an object. For instance, every form has a Requery method that lets you rerun the query that gets its data.
Events. Events are notifications that an ...
Get Access 2010: The Missing Manual 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.