Access.2007.VBA.Bibl..

(John Hannent) #1
FIGURE 5.6
The attributes of the Field object in the DAO object model.

I prefer to always include the object model name in declarations, even if the object in question
only appears in one object model, for consistency and in case that object name might be used in
some other object model I might need to reference in the future.

The DAO Object Model (Old and New) ....................................................................

The DAO 3.6 object model (shown in Figure 5.7) has been listed as deprecated by Microsoft,
which generally means that it will soon be obsolete (not supported). Yet DAO 3.6 is still supported
in Access 2007, at least for databases created in Access 2000 or Access 2002/2003 format, so it is
worth documenting, because you may need to continue working with older format databases for
compatibility with other users who have not yet upgraded to Access 2007.

The DAO object model has many components; for purposes of this book, I will examine in detail
only the main components used to reference Access data — Databases, QueryDefs, Recordsets, and
TableDefs.

The new Access 2007 DAO object model omits (actually, hides) some of the less frequently used
components of the DAO 3.6 object model, and adds a few new ones. This object model is now
specifically focused on working with data in Access tables, always its strong point.

Part II Writing VBA Code to Exchange Data between Office Components

Free download pdf