O'Reilly logo

Access 2003 VBA Programmer's Reference by Armen Stein, Graham Seach, Teresa Hennig, Patricia Cardoza

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

C.4. OpenRecordset Constants

There are a variety of constants you'll use when writing VBA code. The following tables list just a few of the constants you might use when opening a DAO recordset.

NOTE

A runtime error occurs if you attempt to use dbOpenTable in the following Microsoft Jet workspace situations:

  • When the recordset is based on a QueryDef.

  • When the Type argument is set to dbOpenSnapshot.

  • When the Source argument refers to an SQL statement or TableDef that refers to a linked-table.

The following table lists the constants that can be specified for the Type argument.

ConstantDescription
DbOpenTableReturns an editable dataset consisting of records from a single local table only. Cannot be used with linked tables (Microsoft Jet workspaces only)
dbOpenDynamicReturns an editable dataset consisting of pointers to records in a table or query. Can be used on multiple remote tables (ODBCDirect workspaces only)
dbOpenDynasetReturns an editable dataset consisting of pointers to records in a table or query. Can be used on multiple local and linked tables (Microsoft Jet workspaces only)
dbOpenSnapshotReturns a read-only dataset consisting of a copy of records in a table or query. Can be used on multiple local and linked tables (Microsoft Jet workspaces only)
dbOpenForwardOnlyReturns an editable dataset consisting of records in a table. Use this option when you only need to move through the dataset in one pass and in one direction—forward (Microsoft Jet workspaces only)

The following table ...

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