don't use button, since when you click on the button, your textbox will lost its focus, therefore, if you highlight any text for filter, the highlight will disappear.
i suggest using function key (ie, Ctrl-F2 key) for your search:
on the field control you want to filter, put code on the MouseDown event:
Private Sub controlName_KeyDown(KeyCode As Integer, Shift As Integer)
Dim s As String
Dim c As Access.Control
If KeyCode = vbKeyF2 And (Shift And acCtrlMask) Then
Set c = Screen.ActiveControl
'if no highlighted text, clear the filter
If Trim(c.value & "") = "" Or c.SelLength = 0 Then
Me.FilterOn = False
Else
s = Mid(c.value, c.SelStart + 1, c.SelLength)
Me.Filter = "[" & c.Name & "] like " & Chr(34) & "*" & s & "*" & Chr(34)
Me.FilterOn = True
End If
End If
End Sub