Dim filter As String = ""
Dim tbl As Table = Tables("查询_Table1")
Dim txt As String = e.Form.Controls("TextBox1").TEXT
If txt > "" Then
txt = "'%" & txt & "%'"
Filter = "(XM Like " & txt & " Or TXRY Like " & txt & ")"
End If
With e.Form.Controls("KS")
If .Value IsNot Nothing Then
If filter >"" Then
filter = Filter & " And "
End If
filter = Filter & "FSSJ >= #" & .Value & "#"
End If
End With
With e.Form.Controls("JS")
If .Value IsNot Nothing Then
If filter >"" Then
filter = Filter & " And "
End If
filter = Filter & "FSSJ <= #" & .Value & "#"
End If
End With
tbl.filter = filter