If you dimension an object as a
Recordset and then set that object to
databaseobject.OpenRecordset(source), you may receive the following error
message:
Run time error '13': Type mismatch
Back to the top
If your project contains references to both the Data Access Objects (DAO)
library and the ActiveX Data Objects (ADO) library, you may see multiple
Recordset entries in the list when you dimension the
Recordset object.
This error occurs when you list the ADO library with a higher priority than
the DAO library in the
References dialog box, regardless of which Recordset
entry you select from the list.
Back to the top
If you need only the DAO
Recordset object, make sure that the reference for
the DAO object library has a higher priority in the
References dialog box,
or clear the reference to Microsoft ActiveX Data Objects.
If you must reference and use both DAO and ADO
Recordset objects,
dimension the objects explicitly as follows:
Dim adoRS As ADODB.Recordset
Dim daoRS As DAO.Recordset
Back to the top