I have the following Code:
Dim filterStr As String
filterStr = ""
If Len(txtBuyerName) > 0 Then
If filterStr = "" Then
filterStr = filterStr & " ([BuyerName] Like '*" & txtBuyerName & "*')"
Else
filterStr = filterStr & " And ([BuyerName] Like '*" & txtBuyerName & "*')"
End If
End If
Me.Form.Filter = filterStr
If filterStr <> "" Then
Me.Form.FilterOn = True
Else
Me.Form.FilterOn = False
End If
With the above code i need to type full name of the customer to get the result. But i would like to get is like if the Name of the Buyer is "Microsoft Corporation USA". Even if i type "Micro" or "rosft" i should be able to get all the buyer names with "Micro" in any part of the Name. Kindly Help.
Dim filterStr As String
filterStr = ""
If Len(txtBuyerName) > 0 Then
If filterStr = "" Then
filterStr = filterStr & " ([BuyerName] Like '*" & txtBuyerName & "*')"
Else
filterStr = filterStr & " And ([BuyerName] Like '*" & txtBuyerName & "*')"
End If
End If
Me.Form.Filter = filterStr
If filterStr <> "" Then
Me.Form.FilterOn = True
Else
Me.Form.FilterOn = False
End If
With the above code i need to type full name of the customer to get the result. But i would like to get is like if the Name of the Buyer is "Microsoft Corporation USA". Even if i type "Micro" or "rosft" i should be able to get all the buyer names with "Micro" in any part of the Name. Kindly Help.