Im trying to implement a search function based on Farm/Client name. Button opens but it does not search and/or gives no action.
The button filters on this Query
Code:
SELECT qryLabClients.ClientID, qryLabClients.ClientName, qryLabClients.Contact, qryLabClients.Tel, qryLabClients.Email, qryLabClients.Initials, qryLabClients.CompNameFROM qryLabClients
ORDER BY qryLabClients.ClientName;
The query does produce desired output.

Code:
Private Sub btnSearch_Click() Dim s As String
s = InputBox("Enter full or partial client name to search:", "Search Client")
If s = "" Then
Me.FilterOn = False
Exit Sub
End If
' Use the aliased field name from the query
Me.Filter = "[ClientName] LIKE '*" & s & "*'"
Me.FilterOn = True
End Sub