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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set rs = mydb.openrecordset ===== type mismatch 1

Status
Not open for further replies.

vanti1

Technical User
Apr 11, 2001
6
IE
dim db as database, rs as recordset
set db = currentdb





set rs = db.openrecordset("coursesffff", dbopendynaset)

when i run this code i get a type mismatch run time error 13 - it debugs on this line and says that rs is empty

i'm trying to open a table called coursesffff as the recordset.

as per usual thanks for your help
mike
 
Mike, You're using 2000 and I bet it won't compile. Check that Microsoft DAO 3.6 Object Library reference again. I see nothing wrong with what you have here. :) Gord
ghubbell@total.net
 
Access knows about two types of 'RecordSet' - from ADODB and from DAO. You probably want the DAO one, so make it explicit with

Code:
Dim rs as DAO.Recordset

Then your 'OpenRecordset' call should work fine.

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top