O'Reilly logo

Access 2010: The Missing Manual by Matthew MacDonald

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

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 object sends ...

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