Dim Filter As String
With e.Form.Controls("型号")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Dim str As String = "1=2"
For Each s As String In .Value.split(",")
str &= " or 型号 like '%" & s & "%'"
Next
Filter = Filter & " (" & str & ") "
End If
End With
With e.Form.Controls("规格1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Dim str As String = "1=2"
For Each s As String In .Value.split(",")
str &= " or 规格 like '%" & s & "%'"
Next
Filter = Filter & " (" & str & ") "
End If
End With
If Filter > "" Then
Tables("表A").Filter = Filter
End If
With e.Form.Controls("规格1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Dim str As String = "1=1"
For Each s As String In .Value.split(",")
str &= " and 规格 like '%" & s & "%'"
Next
Filter = Filter & " (" & str & ") "
End If
End With