Run-time error '3464' data type mismatch
I am getting "Run-time error '3464': data type mismatch in criteria expression" error While trying to run below query.
Code:
SELECT table1.* FROM table1 WHERE
(table1.txt1='" & txt1 criteria & "') AND
(table1.longfield='" & longfield criteria & "')
What is wrong with my code? I am using the above SQL query with my VB6.
Re: Run-time error '3464' data type mismatch
Your mistake lies in the last part.
Quote:
(table1.longfield='" & longfield criteria & "')
You have unnecessarily used "' in the last part, simply remove it and everything will be OK.
Re: Run-time error '3464' data type mismatch
Well this depends on your code, if you don't need to add more statements then remove the last quotes before parenthesis but if you have any further statements then it is difficult to identify what is the problem. I need some more snapshot of your codes to identify the problem.