May 2007
Intermediate to advanced
1152 pages
30h 53m
English
You'll use a variety of constants 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 Access workspace situations:
When the recordset is based on a QueryDef
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 Access 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 Access 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 Access 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 Access workspaces only). |
The following table lists the constants that can be specified for the Options argument.
The dbInconsistent and dbConsistent constants are mutually exclusive. Similarly you cannot supply a LockEdits argument on a recordset ...
Read now
Unlock full access