改成
Dim flt As String = ""
With e.Form.Controls("textbox9")
If .Value IsNot Nothing Then
Dim str As String = ""
For Each s As String In .value.split(" ")
str &= " or yxmc like '%" & s & "%'"
Next
flt &= str
End If
End With
With e.Form.Controls("textbox10")
If .Value IsNot Nothing Then
Dim str As String = ""
For Each s As String In .value.split(" ")
str &= " or yxmc like '%" & s & "%'"
Next
flt &= str
End If
End With
If flt > "" Then
Filter &= " and (" & flt.substring(3) & ")"
End if
msgbox(filter)