foxtable自带的日期筛选是有点问题。你可以在beforeFilter事件处理一下
(因为时间的值,可能带有毫秒,直接比较的时候,没有判断毫秒值,所以可能有错)
Dim ary() As String = e.Filter.trim.Split(" ")
Dim str As String = ""
msgbox(e.filter)
For i As Integer = 0 To ary.length - 1
If ary(i) = "[第十列]" Then
If ary(i+1) = "=" Then
Dim s As Date = ary(i+2).replace("#","") & " " & ary(i+3).replace("#", "")
str &= ary(i) & " >= #" & s & "# and " & ary(i) & " < #" & s.AddSeconds(1) & "# "
i += 3
ElseIf ary(i+1) = "<=" Then
Dim s As Date = ary(i+2).replace("#","") & " " & ary(i+3).replace("#", "")
str &= ary(i) & " < #" & s.AddSeconds(1) & "# "
i += 3
Else
str &= ary(i) & " "
End If
Else
str &= ary(i) & " "
End If
Next
msgbox(str)
e.Filter = str.trim