O'Reilly logo

Microsoft® Access® 2010 24-Hour Trainer by Truitt L. Bradly, Geoffrey L. Griffith

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

56

The Access Object Model

VBA provides the ability to work with the Access 2010 program directly, through the use of the Access Object Model. The Access Object Model is a collection of classes that are designed specifically to allow the developer to use Access features using directly in VBA code. For example, say you want to open a database in the Access program using VBA code; the developer could call the OpenCurrentDatabase method to accomplish this task. The Access Object Model provides the ability to create instances of the Access program, open and close database files, interact with database objects, and even run the Access wizards and other features of Access 2010. This lesson discusses the Access Object Model and shows how it can be used in VBA code.

LESSON SETUP

This lesson is designed to provide some basic information about using the Access Object Model. You should be familiar with Access databases, creating modules, and the basics of VBA programming. Otherwise, this lesson does not require any other specific knowledge of Access.

THE ACCESS APPLICATION OBJECT

The Access.Application object is the basis for working with all functionality within the Access program. By default, every database created in Access has a reference set to the Access Object Model in the VBA code project. For example, databases created by Access 2010 automatically have a reference set to the Microsoft Access 14.0 Object Library. This reference is what provides the ability to use Access objects, such ...

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