J.2. Recordset.Open Method Options

There are 30 Win32 Registry functions that you can use from VBA. This section describes only 25 of them, because the remaining five require specialist knowledge of Windows security, which is well beyond the scope of this book.

J.2.1. CursorType Argument Options (CursorTypeEnum Values)

ConstantValueDescription
AdOpenUnspecified−1Hidden. No cursor type is specified.
AdOpenForwardOnly0Default. Specifies a forward-only cursor. This is similar to a static cursor, except that you can only scroll forward through the records.
AdOpenKeyset1Specifies a keyset cursor. This is similar to a dynamic cursor, except that records added by other users are not reflected in your recordset; however, records that other users delete are inaccessible in your recordset.
AdOpenDynamic2Specifies a dynamic cursor. In this cursor type, all additions, deletions, and modifications made by other users are visible in your recordset, and all types of row movement are allowed. If the provider supports bookmarks, they too are allowed.
AdOpenStatic3Specifies a static cursor. This cursor type is read-only, and additions, deletions, and modifications made by other users are invisible in your recordset.

J.2.2. LockType Argument Options (LockTypeEnum Values)

ConstantValueDescription
AdLockUnspecified−1Hidden. A lock type is not specified. Clones are created with the same lock type as their original.
AdLockReadOnly1Specifies a read-only recordset.
AdLockPessimistic2Specifies pessimistic locking ...

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.