Part II: Programming Microsoft Access
500
FIGURE 13.13
The DAO object model
DBEngine
Workspace
Database
TableDef QueryDef Recordset Relation Container
Fields Fields Fields Fields Documents
Indexes
Fields
Parameters
Each DAO object also has a collection of properties appropriate for its object type. A TableDef
object may have some properties in common with a QueryDef, but each object has properties
that are unique to its object type. A QueryDef has a Name property, as does a TableDef, but a
QueryDef has a SQL property and a TableDef cannot. The same is true of methods. Each DAO
object has actions that only it can perform. For example, an action query defined by a QueryDef
has an Execute method but a TableDef does not. Learning which properties and methods
apply to each DAO object is perhaps the biggest challenge facing Access developers.
Note
As you read through the following sections, you’ll notice that details have been omitted from the discussions of
each type of data access object. Because of the numerous properties and methods associated with each DAO
object, and the many ways these objects are used in Access applications, it’s not possible to present a detailed
description of the entire DAO object model in a single chapter. Instead, examples of specific ways to use DAO
(and ADO) are given throughout this book. Please refer to the index to find the chapters and sections in this
book discussing particular data access objects.