themiddlenumber
09-29-2006, 12:36 PM
Friends,
I'm using a search string to filter a continuous form. In an attempt to duplicate "Google", I'd like to use a single search field for multiple criteria.
Is there a way to use the space bar as an "OR" event in my search string?
example: my fat head
would look like: "My" OR "Fat" OR "Head"
I presently use code which strings together multiple search fields with an AND. Here's what I've been using:
Dim strWhere As String
Dim lngLen As Long
If Not IsNull(Me.txtLocation) Then
strWhere = strWhere & "([Location] Like ""*" & Me.txtLocation & "*"") AND "
End IF
If lngLen <= 0 Then
strWhere = Left$(strWhere, lngLen)
Forms!frm_SearchSortEvents.filter = strWhere
Forms!frm_SearchSortEvents.FilterOn = True
End If
End Sub
Thanks for you input!
I'm using a search string to filter a continuous form. In an attempt to duplicate "Google", I'd like to use a single search field for multiple criteria.
Is there a way to use the space bar as an "OR" event in my search string?
example: my fat head
would look like: "My" OR "Fat" OR "Head"
I presently use code which strings together multiple search fields with an AND. Here's what I've been using:
Dim strWhere As String
Dim lngLen As Long
If Not IsNull(Me.txtLocation) Then
strWhere = strWhere & "([Location] Like ""*" & Me.txtLocation & "*"") AND "
End IF
If lngLen <= 0 Then
strWhere = Left$(strWhere, lngLen)
Forms!frm_SearchSortEvents.filter = strWhere
Forms!frm_SearchSortEvents.FilterOn = True
End If
End Sub
Thanks for you input!