troubleshooting Question

How to open a recordset to only allow deletions and additions?

Avatar of bejhan
bejhan asked on
Microsoft Access
6 Comments1 Solution293 ViewsLast Modified:
You can use a combination of the following constants for the options argument.

Constant Description
dbAppendOnly  Allows users to append new records to the Recordset, but prevents them from editing or deleting existing records (Microsoft Jet dynaset-type Recordset only).
dbSQLPassThrough  Passes an SQL statement to a Microsoft Jet-connected ODBC data source for processing (Microsoft Jet snapshot-type Recordset only).
dbSeeChanges Generates a run-time error if one user is changing data that another user is editing (Microsoft Jet dynaset-type Recordset only). This is useful in applications where multiple users have simultaneous read/write access to the same data.  
dbDenyWrite  Prevents other users from modifying or adding records (Microsoft Jet Recordset objects only).
dbDenyRead  Prevents other users from reading data in a table (Microsoft Jet table-type Recordset only).
dbForwardOnly  Creates a forward-only Recordset (Microsoft Jet snapshot-type Recordset only). It is provided only for backward compatibility, and you should use the dbOpenForwardOnly constant in the type argument instead of using this option.  
dbReadOnly  Prevents users from making changes to the Recordset (Microsoft Jet only). The dbReadOnly constant in the lockedits argument replaces this option, which is provided only for backward compatibility.
dbRunAsync Runs an asynchronous query (ODBCDirect workspaces only).  
dbExecDirect  Runs a query by skipping SQLPrepare and directly calling SQLExecDirect (ODBCDirect workspaces only). Use this option only when youre not opening a Recordset based on a parameter query. For more information, see the "Microsoft ODBC 3.0 Programmers Reference."
dbInconsistent  Allows inconsistent updates (Microsoft Jet dynaset-type and snapshot-type Recordset objects only).
dbConsistent  Allows only consistent updates (Microsoft Jet dynaset-type and snapshot-type Recordset objects only).

Above are the only constants to be used in the options argument of the OpenRecordset method. I can't seem to see any combination of these which would allow for only deletions or additions but not edits. How can I achieve this?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros