visual basic 6 - Data mismatch
Private Sub cmdsearch_Click()
Dim qry As String
qry = "select * from [heavy equipment] where codeno=" & Val(txtsearchcode.Text)
searchheavyfiles.RecordSource = qry
searchheavyfiles.Refresh
End Sub
========================
The code above after running it show error message ADODC1-Data type mismatch in criteria expression. Is there any body who can tell me the problem? Thanks in advance.
Comment on GaryStaunton's post
I have assumed that the database field is a TEXT field, if not, let me know. My example above is for a TEXT field.
Comment on GaryStaunton's post
Thanks gary, I found that the field is text not numeric. I am using the code with dash e.g 25-21,25-22-25-23 and so on. Thanks a lot for the information. :)