3
Contributors
3
Replies
15
Views
7 Months
Discussion Span
Last Post by love back
0

Dim vdb As Database
Dim mtab As Recordset
Dim vproj As String, vspec As String, VType As String
Dim mcount As Integer, mcount1 As Integer
Dim mdate As Date
Set vdb = CurrentDb()
vproj = Me![Combo0]
vspec = Me![Combo2]
VType = Me![Combo7]
mcount = 0
mcount1 = 0
Set mtab = vdb.OpenRecordset("select * from Master where projcode='" + vproj + "' and specno ='" + vspec + "' and jtype='" + VType + "'")
“(Showing mtab= Nothing”)

-1

You receive a "Type mismatch" error when you run the OpenRecordset method
 Email
 Print
Symptoms
If you dimension an object as a Recordset and then set that object to databaseobject.OpenRecordset(source), you may receive the following error message:
Run time error '13': Type mismatch
Cause
If your project contains references to both the Data Access Objects (DAO) library and the ActiveX Data Objects (ADO) library, you may see multiple Recordset entries in the list when you dimension the Recordset object. This error occurs when you list the ADO library with a higher priority than the DAO library in the References dialog box, regardless of which Recordset entry you select from the list.
Resolution
ANADMANNI

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.