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

Data type mismatch error

Status
Not open for further replies.

megabyte214

Programmer
Nov 7, 2001
40
US
I am gettting this error:
Data type mismatch in criteria expression
The primary field typeID in the courseType table is an integer
I am linking to typeID in the course table which is also an integer...!!!

My SQL statement:

intcoursetypeID = "11"
strSQL2 = "Select courseType.typeID, course.course, course.courseID FROM courseType INNER JOIN course ON courseType.typeID = course.typeID WHERE courseType.typeID = '" & intcoursetypeID & "' "
 
try
WHERE courseType.typeID = " & Cint(intcoursetypeID) & "

delete the single quotes and put the Cint in front of intcoursetypeID

It will work for sure.
Regards,
Durug I was born intelligent - education ruined me. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top