Mapping the Microsoft Access 95 Object: MSAccess 7.0

Ken Lassesen
Microsoft Developer Network Technology Group

December 14, 1995

Click here for a diagram of the Microsoft Access 95 object in various graphics formats.

Abstract

This article presents a graphic map of the Microsoft® Access 95 object, showing its properties, methods, and child objects. This server is available in Visual C++® and many products based on Visual Basic® for Applications. These products include Microsoft Excel version 5.0 and later, Microsoft Access 95, Visual Basic version 4.0, and Visual C++ version 4.0.

The Microsoft Access 95 Object

Microsoft® Access 95 uses the Data Access Object (DAO) to retrieve data from database servers by means of the Open Database Connectivity (ODBC) driver manager and a specified server driver. This extended map is not comprehensive: each major component of the Microsoft Access object (for example, DAO and controls) is described as a separate extended map. See the bibliography for a list of available extended maps.

The DAO objects in Microsoft Access should not be used by controllers. DAO used directly is an in-process OLE Automation server resulting in high-performance data transfer. DAO used by Microsoft Access is an out-of-process OLE Automation server resulting in slow data transfer. Controllers should use DAO directly to gain the advantages of an in-process, early binding OLE Automation server.

Figure 1 shows the relationship between objects as described by the Object Viewer and online Help files. A map serves as a good learning aid and as a quick reference for developers. After producing a map, I found that it was easy to work with the object: I just post the appropriate map on my wall for quick reference, which is a lot faster than clicking objects in a Help file one by one to discover their properties and methods. For an introduction to using OLE Automation see my article, "Using Microsoft OLE Servers to Develop Solutions."

Because Figure 1 is unreadable online, I have included the two most common graphics formats—encapsulated PostScript™ (.EPS) and Windows® metafile (.WMF)—as well as a copy of my original ShapeWare™ Visio™ version 4.0 file (.VSD). The first two formats can be opened and the maps printed across multiple pages using Microsoft Excel or a commercial graphics application such as Adobe™ PageMaker™, CorelDRAW®, or Microsoft Publisher. The original Visio file is included for those who wish to modify the diagram.

Figure 1. Map of the Microsoft Access 95 object

The objects and collections in Figure 1 are defined in Table 1.

Table 1. Object and Collection Definitions

Object or Collection Definition
Application object Represents the active Microsoft Access application. The Application object contains all Microsoft Access objects and collections.
DBEngine object Represents the Microsoft Jet database engine. As the top-level object, it contains and controls all other objects in the hierarchy of data-access objects. It is part of the DAO object.
Workspace object Defines a session for a user. It contains open databases and provides mechanisms for simultaneous transactions and for a secure workgroup. It is part of the DAO object (see the extended map for DAO).
Database object Represents an open database. It is part of the DAO object (see the extended map for DAO).
Forms collection Contains all of the currently open forms in a Microsoft Access database.
Form object Refers to a particular Microsoft Access form.
Reports collection Contains all of the currently open reports in a Microsoft Access database.
Report object Refers to a particular Microsoft Access report.
Screen object Refers to the particular form, report, or control that currently has the focus.
Dynaset object Is included for backward compatibility and should not be used.
Recordset object Consists of the records in a base table or the records returned from a query. It is part of the DAO object (see the extended map for DAO).
Section object Identifies a section of a form or report and provides access to the properties of that section.
Module object Is used to specify a form module or report module.
Controls collection Contains all of the controls on a form or report.
Control object Represents a control on a form or report.
Properties collection Contains all the Property objects for a specific instance of an object.
Property object Is a built-in characteristic or a user-defined characteristic of a data access object.
BoundObjectFrame, CheckBox, ComboBox, CommandButton, CustomControl, Image, Label, Line, ListBox, ObjectFrame, OptionButton, OptionGroup, PageBreak, PaletteButton, Rectangle, TextBox, ToggleButton, SubReport, SubForm, GroupLevel objects Represent one of several types of controls. (Controls and OCXs are documented in separate articles.)

Bibliography

Lassesen, Ken. "Mapping the Data Access Object: DAO 3.0." (Development Library, Technical Articles, Visual Basic Articles)

Lassesen, Ken. "Using Microsoft OLE Automation Servers to Develop Solutions." (Development Library, Technical Articles, Visual Basic Articles)