I have a table in access which has a check box (yes/no). i want to match the value of that check to a check box in VB 6.
i'm sure that the access check box outputs a true or false value in VB and the check box in VB is either 0 or 1. So i have made it so that if the check box in vb is 1 then a boolean var = true. All i wanted to do then is match that var with value of check box in access. So i wrote this
GetData ("SELECT * FROM tblpitch WHERE electric = ' " & vbelectric & " ' ")
getdata is a procedure which connects to the database and works fine with all my other sql statements.
'electric' is set to 'yes/no' in access
'vbelectric' is set to either true or false in vb
everytime i run this piece of code i get the error...
unable to connect
data type mismatch in criteria expression.
coudl someone please tell me what is wrong with the sql code, or what else i have done wrong. thanks alot