jacksonwearn
New member
- Local time
- Today, 12:23
- Joined
- Jun 14, 2013
- Messages
- 9
So I have been developing a database tool that needs to have multiple ways of filtering data. I wanted to be able to display the data nicely so I'm using a split form.
As usual, there is an easy to read form on the top half and a datasheet on the bottom half. On one side of the form half I have some comboboxes that are associated with fields in the datasheet. The comboboxes apply multiple filters, narrowing the search results down. It all works fine.
However, I've been trying to figure out a way to remove just one filter at a time. There is a button to the right of each combobox that is intended to clear just one filter.
So far this is what I have. This code clears all filters.
I had some success using another method with select statements. Every time I cleared a filter, I would also check every other combobox to see if they were not null, then reapply each one of there filters. That seems way over complicated. I'm sure I'm missing something.
TL;DR How do I remove one, specific filter from a split form, after I have applied many different filters? :banghead:
Any help is appreciated
Thanks,
Jackson
As usual, there is an easy to read form on the top half and a datasheet on the bottom half. On one side of the form half I have some comboboxes that are associated with fields in the datasheet. The comboboxes apply multiple filters, narrowing the search results down. It all works fine.
However, I've been trying to figure out a way to remove just one filter at a time. There is a button to the right of each combobox that is intended to clear just one filter.
So far this is what I have. This code clears all filters.
Code:
Function removeFilter(source As String, combo As ComboBox)
'source is the field being filtered and combo is the current
'value of the combobox
With Forms("PART_QUERY")
.Filter = "[" & source & "] = " & Chr(34) & combo & Chr(34)
.FilterOn = False
End With
End Function
TL;DR How do I remove one, specific filter from a split form, after I have applied many different filters? :banghead:
Any help is appreciated

Thanks,
Jackson