Hello, I apologize if this topic was posted before- I couldn't find an answer to this particular question, though there are lots of threads about multiple criteria.
Is it possible to have a SINGLE filter button that filters a form only by the filter criteria that the user specifies and not all the possible criteria that the filter may have? That is, if there are multiple criteria that the user can filter by but she only chooses to specify, say, two out of five, and leaves the other three filter boxes blank, I want the filter to only pick up the ones she specified and NOT filter by Nulls in the other three fields.
I have 5 fields on which the user can filter by typing in what they want in text boxes. I don't want to have 5 separate filter buttons, I want just one that sets the filter on all the specified criteria. Is it possible for the button to pick out only the criteria that the user specified? I mean, without having to go through ten thousand if statements like
If len(me.filterfield1)>0 and len(me.filterfield2)= 0 and... len(me.filterfield5)= 0 then
'set filter string to just the first criteria
Else
...and so on.
Or is it better to just have a separate filter button for each text box?
Thank you.
Is it possible to have a SINGLE filter button that filters a form only by the filter criteria that the user specifies and not all the possible criteria that the filter may have? That is, if there are multiple criteria that the user can filter by but she only chooses to specify, say, two out of five, and leaves the other three filter boxes blank, I want the filter to only pick up the ones she specified and NOT filter by Nulls in the other three fields.
I have 5 fields on which the user can filter by typing in what they want in text boxes. I don't want to have 5 separate filter buttons, I want just one that sets the filter on all the specified criteria. Is it possible for the button to pick out only the criteria that the user specified? I mean, without having to go through ten thousand if statements like
If len(me.filterfield1)>0 and len(me.filterfield2)= 0 and... len(me.filterfield5)= 0 then
'set filter string to just the first criteria
Else
...and so on.
Or is it better to just have a separate filter button for each text box?
Thank you.