O'Reilly logo

Access™ 2007 VBA Bible: For Data-Centric Microsoft® Office Applications by Helen Feddema

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

Chapter 5. Working with Access Data

IN THIS CHAPTER

  • Using the old and new DAO object models to work with Access data

  • Working with Access databases in formats from 2000 to 2007

  • Using the ADO object model to work with Access data

  • Converting DAO code to ADO code

In older versions of Microsoft Office, there were two choices for working with data stored in Access tables. One was the Data Access Objects (DAO) object model, which was developed specifically to work with Access data in recordsets (including form recordsets) and to work with table structure using the Tables (and subsidiary Fields) collections. Because of these customized features, DAO was the best object model for working with Access data.

The other choice for working with Access data was (and is) the ADO object model, introduced with Visual Studio 97, and available for use in Office 2000 and up. This object model is intended for working with data in a wide variety of sources, including Access databases. Although it lacks some of the customized features that make DAO so well suited to Access data, ADO code works fine for basic data manipulation, where you don't need to work with Access form recordsets or create tables and fields (in other words, you are just working with data in Access tables, not with their structure).

Before the release of Office 2007, word was out that Microsoft was dropping support for the DAO object model (and indeed you can see statements to this effect in various online Microsoft documents). I wondered whether ...

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