Updating a recordset in msaccess 2016
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.
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.