Your code should look something like:
If Not IsNull(Me.Textbox1) Then
strFilter = "[Company Name] Like '*" & Me.Textbox1 & "*'"
If Not IsNull(Me.Textbox2) Then
strFilter = strFilter & " AND [Company Number] =" & Me.Textbox2
If Not IsNull(Me.Textbox3) Then
strFilter = strFilter & "[State] = '" & Me.Textbox3 & "'"
If Not IsNull(strFilter) Then
If Left(strFilter, 5) = " AND " Then
strFilter = Right(strFilter, Len(strFilter) - 5)
Forms![ICB Customers].Filter = strFilter
Forms![ICB Customers].FilterOn = True
Forms![ICB Customers].FilterOn = False
Pls make sure you use the correct field and control names in the place
of my assumed ones. I have assumed Company Number is numeric, and that
for both Company Number and State you want an exact match, as opposed to
"contains string" on the name.