-- 作者:大红袍
-- 发布时间:2015/7/24 15:04:00
--
筛选目录树有Bug,对于有时间的日期,无法筛选。
必须特殊处理一下,在BeforeFilter加代码
Dim ary() As String = e.Filter.Split(" ") Dim str As String = "" For i As Integer = 0 To ary.length - 1 If ary(i) = "[第五列]" Then If ary(i+1) = "=" Then Dim s As String = ary(i+2).replace("#","") str &= ary(i) & " >= #" & s & "# and " & ary(i) & " <= #" & s & " 23:59:59# " i += 2 ElseIf ary(i+1) = "<=" Then Dim s As String = ary(i+2).replace("#","") str &= ary(i) & " <= #" & s & " 23:59:59# " i += 2 Else str &= ary(i) & " " End If Else str &= ary(i) & " " End If Next msgbox(str) e.Filter = str
|