Recordset in Access 2007

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)
 
V

vanderghast

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top