6.7. DAO Object Properties

As you're no doubt already aware from previous chapters, every Access object (such as forms and reports) has a collection of properties. This section examines some of those properties, and describes how to use them to change Access and DAO object behavior.

All the properties associated with an Access object exist from the moment you create the object. DAO object properties, however, exhibit quite different behavior. In DAO, depending on the object, not all its properties exist until you set its value. It is quite important, therefore, that you understand the differences between the types of properties used in DAO.

6.7.1. DAO Property Types

In contrast to Access object properties, the three types of object properties are: built-in, system-defined, and user-defined.

  • Built-in properties exist when the object is created, and like most of their Access counterparts, define the characteristics of the object itself. For example, Name and Type are examples of built-in properties.

  • System-defined properties are those that Access adds to the object's Properties collection when it needs the property in order to work its magic. These are not Access database engine properties, but are created and used by Access.

  • A user-defined property can be added to an object's Properties collection when you explicitly set a value to it. For example, a field's Description property is a user-defined property. Although you can set a value to it when you define the table, Access doesn't ...

Get Access™ 2007 VBA Programmer's Reference 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.