I have one Combo Search box that that uses the code below (Code#1) to search 2 Subforms on a form. It works for ONE selection only.
I have to use a button to close and reopen the form in order to make another selection with the combo box. Is there something that I can add
in Code#! to allow me to make additional selections with the combo box without having to close and reopen the form with a button?
Private Sub CmbSearch_AfterUpdate()
If Len(Form_DetailMonth.Filter) > 0 Then
Form_DetailMonth.Filter = Form_DetailMonth.Filter & " AND " & "Expr21 = '" & Me.CmbSearch & "'"
Form_DetailMonth.Filter = "Expr21 = '" & Me.CmbSearch & "'"
Form_DetailMonth.FilterOn = True
If Len(Form_DetailAllCustomer.Filter) > 0 Then
Form_DetailAllCustomer.Filter = Form_DetailAllCustomer.Filter & " AND " & "Expr21 = '" & Me.CmbSearch & "'"
Form_DetailAllCustomer.Filter = "Expr21 = '" & Me.CmbSearch & "'"
Form_DetailAllCustomer.FilterOn = True
I use this button to close and reopen the form:
Private Sub Command26_Click()