I have a form based on a query. I am trying to create a search system which uses filters to narrow down the number of records displayed. At present though, it can only filter based on one criteria at a time. I have each text or combo box with the following code as the after_update event:
Dim strFilter As String
strFilter = "[Surname] = '" & Me.srcSurname & "'"
DoCmd.ApplyFilter , strFilter
How can I turn this into something that enables the user to select several criteria, for example to show only members with the surname "Smith" *AND* who live in "Manchester"?
Ideally I'd rather not have a separate 'search' button with everything set up so that the filter is applied only with after_update events, but that depends on how much more complicated that would make life for me!
Dim strFilter As String
strFilter = "[Surname] = '" & Me.srcSurname & "'"
DoCmd.ApplyFilter , strFilter
How can I turn this into something that enables the user to select several criteria, for example to show only members with the surname "Smith" *AND* who live in "Manchester"?
Ideally I'd rather not have a separate 'search' button with everything set up so that the filter is applied only with after_update events, but that depends on how much more complicated that would make life for me!