Hi, I have several combos in a form which individually filter the records in that form (continuous). The filtering process is done in a private sub filterList() and all the combos AfterUpdate event calls that procedure. Example:
And so on for all the combos.
I also have command buttons doing same thing for each combo to remove the filter:
I was wondering if there is a better, more practical way of doing this. Thought about naming the combos and buttons as cbo_filter1, cbo_filter2 etc and putting in a for - next loop but couldn't figure out where to put that loop in code.
Thanks for any advice
Code:
Private Sub cbo_filterDate_AfterUpdate() filterList End Sub Private Sub cbo_filterSupp_AfterUpdate() filterList End Sub Private Sub cbo_filterGroup_AfterUpdate() filterList End Sub
I also have command buttons doing same thing for each combo to remove the filter:
Code:
Private Sub cmd_removeFilterDate_Click() Me.cbo_filterDate.Value = Null filterList End Sub Private Sub cmd_removeFilterSupp_Click() Me.cbo_filterSupp.Value = Null filterList End Sub Private Sub cmd_removeFilterGroup_Click() Me.cbo_filterGroup.Value = Null filterList End Sub
Thanks for any advice
Comment