Dim Filter As String = "1=1"
With e.Form.Controls("Brands")
If .Value IsNot Nothing Then
Filter &= " and 品牌名称= '" & .Value & "'"
End If
End With
With e.Form.Controls("Category")
If .Value IsNot Nothing Then
Filter &= " and 品类_名称= '" & .Value & "'"
End If
End With
If Filter > "" Then
Tables("市场品牌统计表").Filter = Filter
End If