Private Sub Text0_Change()
If IsNull(Me.Text0) Then Exit Sub
Dim i, IntStar As Integer
Dim strCx As String
If KeyCode = vbKeySpace Then Exit Sub '分隔符不为空格时,可省去
IntStar = Text0.SelStart
For i = 0 To UBound(Split(Text0.Text, " "))
strCx = strCx & "InStr(字段名, '" & Split(Text0.Text, " ")(i) & "') > 0 And "
Next i
Me.Child0.Form.Filter = strCx & True
Me.Child0.Form.FilterOn = True
IntStar = IntStar + 1
Text0.SelStart = IntStar
End Sub
2、“或”,就是你所要的情况
Private Sub Text0_Change()
If IsNull(Me.Text0) Then Exit Sub
Dim i, IntStar As Integer
Dim strCx As String
If KeyCode = vbKeySpace Then Exit Sub '分隔符不为空格时,可省去
IntStar = Text0.SelStart
For i = 0 To UBound(Split(Text0.Text, " "))
strCx = strCx & "InStr(字段名, '" & Split(Text0.Text, " ")(i) & "') > 0 Or "
Next i
Me.Child0.Form.Filter = strCx & False
Me.Child0.Form.FilterOn = True
IntStar = IntStar + 1
Text0.SelStart = IntStar
End Sub