Hi, I'm new to access and need some help with a project I'm working on. I have a database that will search through one field and I'm trying to change it so it will search through two fields and everything I try I get "Run-time error '13': Type mismatch".
Here is what I have that works perfectly.
Form_frmTools.RecordSource = "select * from Tools where " & "ToolName" & " LIKE '*" & txtSearchString & "*'"
But I want to change it so it will search through the fields ToolName and PartNumber. This is what I have now and I'm getting the error.
Form_frmTools.RecordSource = "select * from Tools where " & ("PartNumber" & " LIKE '*" & txtSearchString & "*'") Or ("ToolName" & " LIKE '*" & txtSearchString & "*'")
I've also tried this with the same result.
Form_frmTools.RecordSource = "SELECT Tools.PartNumber, Tools.ToolName, * FROM Tools WHERE (((Tools.PartNumber) Like "*" & [Forms]![frmSearch]! [txtSearchString] & "*")) OR (((Tools.ToolName) Like "*" & [Forms]![frmSearch]![txtSearchString] & "*"))"
Any help is appreciated. Thanks in advance.