Dim Filter As String
With e.Form.Controls("店铺名称1")
If .Value IsNot Nothing Then
Filter = "店铺名称 = '" & .Value & "'"
End If
End With
With e.Form.Controls("产品类别1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "产品类别 = '" & .Value & "'"
End If
End With
With e.Form.Controls("处理人1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "处理人 = '" & .Value & "'"
End If
End With
With e.Form.Controls("开始1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "记录时间 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("结束1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "记录时间 <= #" & .Value & "#"
End If
End With
Dim txt1 As String = e.Form.Controls("TextBox4").Text
Dim tbl As Table = Tables("table_3")
If txt1 = "" Then
tbl.Filter = ""
Else
Dim Values() As String
Values = txt1.split(",")
Dim f As String
For Index As Integer = 0 To Values.Length - 1
If f > "" Then f = f & " or "
Dim txt As String =Values(Index)
txt = "'%" & txt & "%'"
f = f & "店铺名称 Like " & txt & " Or 单号 Like " & txt & " Or 处理人 Like " & txt & " Or 发货仓库 Like" & txt & " Or 物流公司 Like" & txt & " Or 赠送SKU Like" & txt & " Or 客户姓名 Like" & txt & " Or 系统单号 Like" & txt & " Or 产品类别 Like " & txt & " Or 配件SKU Like " & txt & " Or 产品SKU Like " & txt & " Or 联系方式 Like " & txt & " Or 追踪号 Like " & txt & " Or 处理方式 Like " & txt & " Or 备注 Like " & txt & " Or 回访 Like" & txt & " Or 状态 Like" & txt & " Or 寄送地址 Like " & txt & " Or [状况描述 原因] Like " & txt
Next
tbl.Filter = f
End If
If Filter > "" Then
Tables("table_3").Filter = Filter
End If