Hi Drew,
Common problem. Qualify your recordset object with the name of the library it lives in, in this case DAO:
Dim rec1 As DAO.Recordset
If you check your references, you should see the ADO library listed before the DAO library. When VBA tries to resolve object references, it grabs the object type from the first library listed in your references list that contains the relevant object type. Both ADO and DAO define a Recordset object. So your code thinks its working with an ADO Recordset, not a DAO recordset. (ADO is the default data access library in Access since 2K).
HTH,
Bob
|