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

datatype mismatch with DAO in ac2000

Status
Not open for further replies.

sametch

Technical User
Apr 13, 2002
2
GB
I have been using a database in acc97 for some time now, that uses DAO to manipulate records in a table. I recently upgraded to Ac2000. Realising that ac2000 doesn't support DAO by default, I set the DAO 3.6 object library reference by ticking it in VBA references.

Each time I run a particular routine I get a run time error "type mismatch 13" at the second line below:

Set db = CurrentDb
Set rs = db.OpenRecordset("tblResults")

Note tblResults is a valid table and exists. Can anyone help me understand why this is occuring?

Any help appreciated

 
I suspect that even though you have ticked the DAO 3.6 object library, there is some other library higher up in the hierarchy which is being used by the OpenRecordset command. Try going to the Tools, References menu, and pointing to the DAO 3.6 library item (ensuire that it is ticked), raising its priority in the library hierarchy by pressing the up-arrow to get it as high as possible in the list.

This may solve the problem.

Cheers,
Steve
 
Steve

theres only one thing nicer than finding an answer to a problem thats been bugging you for days. Thats finding an answer that takes all of 5 seconds to put right.

Your recommendation worked.

Thanks alot

Alan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top