successive filters

C

chriske911

can it be done to filter on a filtered recordset using the
docmd.applyfilter command?
I mean I use this command to filter out on a field value on the form by
double clicking that field
but the next filter event undoes the previous filter
I want to be able to gradually filter out until I have just a few
records to check out
this by just clicking on the fields inside the form

I already apply some combo's to return a select query
but to do this for every field in the form would just clutter up the
interface without adding an additional value to it's functionality

thnx
 
W

Wayne Morgan

You will need to concatenate the filters together.

If Me.Filter <> "" Then
Me.Filter = Me.Filter & " And [NewField]=" & Me.txtMyTextbox
Else
Me.Filter = "[NewField]=" & Me.txtMyTextbox
End If

Of course, if you're going to have a mix of data types, you'll also have to
adjust the syntax for the various data types, but you should have already
run into that.
 
Top