How to: Create a DAO Recordset From a Table In the Current Database

Access Developer Reference

The following example uses the OpenRecordset method to create a table-type Recordset object for a table in the current database:

  Dim dbsNorthwind As DAO.Database
Dim rstCustomers As DAO.Recordset

Set dbsNorthwind = CurrentDb Set rstCustomers = dbsNorthwind.OpenRecordset("Customers")