-
Hi Everyone,
What is wrong with this bit of code? I keep getting a data type mismatch in criteria expression error.
Code:
rsVendors.Open "SELECT * FROM Vendors WHERE VendorID = '" & txtMemberID.Text & "'", _
conn, adOpenStatic, adLockOptimistic
I think the error is coming from the txtMemberID.Text text box which is being filled by ADO from the Members table. This field is an autonumber field. Why is this SQL statement not working? I would appreciate any help. Thank you.
-
VendorID is probably a number and you are using it as a string. Take out the single quotes.