searching

voltie

Registered User.
Local time
Today, 00:24
Joined
Mar 15, 2009
Messages
20
hi i got a little question,

i have a search button for only searching on surname,
i want to search on surname and name or name, so i want a combination
so when i search for surname JOHN, and there are 10 Johns, i want to click also name, to filter again.. can some one help me, the code i got now is:


Private Sub test_Click()
If Not IsNull(txtca) Then
Me.Filter = "surname LIKE '*" & txtca.Value & "*'"
Me.FilterOn = True
End If
End Sub
 
i have fix it thanks,

Me.Filter = "name Like ""*" & Me!Text** & "*"" AND surname Like ""*" & Me!Text** & "*"""
 
but this one, doesnt search on Name, can someone help me:)

it does only search in Surname and Surname in combination with Name, but noy only in Name..
 
Access does not like you using the word Name as a field. This is known as a reserved word try changing it and retry
 

Users who are viewing this thread

Back
Top Bottom