Updating a recordset in msaccess 2016

Rated 4.10/5 based on 689 customer reviews

To make it easier for the recordset declaration I used DAO.recordset and ADO.Recordset, I do have DAO reference prior to ADO reference in the reference window of VBA code.

updating a recordset in msaccess 2016-71

updating a recordset in msaccess 2016-68

Most of the traps yield no syntax error; they are bugs lying dormant in your code until particular conditions are met.

See Solving Problems with Library References for details. To ensure your code works reliably: There are different types of DAO recordset, with different methods.

When you Open Recordset() on a query or attached table, Access defaults to a Dynaset type (db Open Dynaset).

So if you later split your database so the tables are attached, the code fails when you use a method that no longer applies. Dynaset guarantees your code will work for all queries and tables, local and attached.

Example: Using any of the Move methods (Move First, Move Last, Move Next, or Move Previous) causes an error if the recordset has no records. Either of these approaches works: For recordsets based on queries, SQL statements, and attached tables, the Record Count property returns the number of records accessed so far.

Leave a Reply