Recordset in Access 2007

  • Thread starter Thread starter TADropik
  • Start date Start date
T

TADropik

I get Run-time error 13 "Type mismatch" on the Set rs line below:


Dim rs as Recordset
Dim sSQL as string

sSQL = "Select LastName FROM tbl_Users"

Set rs = currentdb.openrecordset(sSQL)
 
Try:

Dim rs AS DAO.Recordset

instead of

Dim rs AS Recordset


Right now, you probably have the possibility to use either DAO recordsets,
either ADO recordsets (with ADO higher in the priority list of references).



Vanderghast, Access MVP
 
Back
Top