I have the code below set-up on a combo box that filters a subform. The problem I'm running into is I have this set-up on multiple combo boxes (with different combo box names, etc.). The filters seemed to work fine at first, but now that I've built out the database more, the filters are canceling each other out. I trigger the first one and it works fine. I trigger the next one and it filters what is expected for the second combo box, but it cancels the first filter in the process. Any suggestions on how to fix this?
Private Sub cboCostCenter_AfterUpdate()
If Len(Me.cboCostCenter & vbNullString) > 0 Then
Me![frmEntry_sub].Form.Filter = "[Entry_CostCenterIDfk] = " & Me.cboCostCenter
Else
Me![frmEntry_sub].Form.Filter = "[Entry_CostCenterIDfk] = 0"
End If
Me![frmEntry_sub].Form.FilterOn = True
End Sub