老师您好,这是我的筛选Dim Filter As StringWith e.Form.Controls("店铺名称")
If .Value IsNot Nothing Then
Filter = "店铺名称 = '" & .Value & "'"
End If
End With
With e.Form.Controls("产品类别")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "产品类别 = '" & .Value & "'"
End If
End With
With e.Form.Controls("单号")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "单号 = '" & .Value & "'"
End If
End With
With e.Form.Controls("处理人")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "处理人 = '" & .Value & "'"
End If
End With
With e.Form.Controls("开始")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "记录时间 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("结束")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "记录时间 <= #" & .Value & "#"
End If
End With
If Filter > "" Then
Tables("Table_3").Filter = Filter
End If