This is a pretty big question. In short, a recordset is a selection of records from a table or query. Depending on the query used, it can be used to add, edit, delete and manage records. A set of records can be obtained using ADO or DAO and can have various methods and properties, respectively. Bonding to a DAO that is native to Access:
Dim rs As DAO.Recordset Set rs=CurrentDB.OpenRecordset("Select ID, Company From Companies") rs.Edit rs!Company="ABC" rs.Update rs.AddNew rs!Company="ABC" rs.Update Do While Not rs.EOF If rs!Company="ABC" Then ''Do something End If rs.MoveNext Loop Set rs=Forms!SomeForm.RecordsetClone rs.FindFirst "Company='ABC'" If Not rs.NoMatch Then Forms!SomeForm.Bookmark=rs.Bookmark End If
source share