Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set rs=db.OpenRecordset run time error "type mismatch"

Status
Not open for further replies.

nikky

Programmer
Feb 7, 2002
80
US
I am getting "run time error 13 - type mismatch" when my code hits the last line:

dim db as database
dim rs as recordset
set db=currentdb

set rs=db.OpenRecordset("Table1")
where "table1" is a real table in the database..

Can anyone help ?




 
dim db as DAO.database
dim rs as DAO.recordset
set db=currentdb

set rs=db.OpenRecordset("Table1")
Try adding the DAO qualifiers. I've see that error there before.
Paul
 
That worked like a charm, thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top