不可能吧?试试这样,不行,就是上次例子
Dim filter As String = “”
Dim sts() As String = {"染料代号","存货名称","供应商"}
For Each st As String In sts
Dim var As String = e.Form.controls(st).Text
If var IsNot Nothing Then
var = var.replace("*","[*]")
If filter <> "" Then
filter = filter & " And " & st & " Like '*" & var & "*'"
Else
filter = st & " like '*" & var & "*'"
End If
End If
Next
Tables("物料信息").filter = filter