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.
Constant | Description |
---|---|
DbOpenTable | Returns an editable dataset consisting of records from a single local table only. Cannot be used with linked tables (Microsoft Jet workspaces only) |
dbOpenDynamic | Returns an editable dataset consisting of pointers to records in a table or query. Can be used on multiple remote tables (ODBCDirect workspaces only) |
dbOpenDynaset | Returns 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) |
dbOpenSnapshot | Returns 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) |
dbOpenForwardOnly | Returns 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 ...
Get Access 2003 VBA Programmer's Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.