试试这样:
Dim name As String= e.Form.Controls("TextBox1").Text
Dim name1 As String
For i As Integer = 29 To 32
If e.Form.Controls("TextBox" & i).Text <> ""
name1 = name1 & e.Form.Controls("TextBox" & i).Text & "|"
End If
Next
Dim txt As String = e.Form.Controls("TextBox14").Text
Dim tbl As Table = Tables(name)
If txt = "" Then
tbl.Filter = ""
Else
txt = "'%" & txt & "%'"
name1 ="""" & name1.Replace("|"," Like & txt & Or ") & """"
tbl.Filter = name1
End If
[此贴子已经被作者于2020/2/21 18:13:00编辑过]