successive filters

  • Thread starter Thread starter chriske911
  • Start date Start date
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top