Dim Filter As String
If e.node.Text = "加载所有数据" Then
Filter = ""
Else
Dim d1 As Date
Dim d2 As Date
Dim d3 As Date
Dim d4 As Date
Dim Year As Integer = e.Node.DataRow("年")
Dim Month As Integer = e.Node.DataRow("月")
Dim day As String = e.Node.DataRow("日")
Select Case e.Node.Level
Case 0
d1 = New Date(Year,1,1) '取得该年的第一天
d2 = new Date(Year,12,31) '取得该年的最后一天
Filter = "[接障日期] >= '" & d1 & "' And [接障日期] <= '" & d2 & "'"
Case 1
d1 = New Date(Year, Month, 1) '取得该月的第一天
d2 = new Date(Year, Month, Date.DaysInMonth(Year,Month)) '取得该月的最后一天
Filter = "[接障日期] >= '" & d1 & "' And [接障日期] <= '" & d2 & "'"
Case 2
d1 = New Date(Year, Month, 1) '取得该月的第一天
d2 = new Date(Year, Month, Date.DaysInMonth(Year,Month)) '取得该月的最后一天
d3 = New Date(Year, Month, day)
d4 = New Date(Year, Month, day-1)
Filter = "[接障日期] >= '" & d3 & "' And [接障日期] <= '" & d3 & "'"
End Select
End If
With DataTables("本地服务热线客服预处理过程记录表")
.LoadFilter = Filter '设置加载条件
.LoadPage = 0 '加载第一页
.LoadTop = 500 '每页5行
.Load()
e.Form.Controls("TextBox1").Value = 1 & "/" & .TotalPages
End With
应该是红字这的问题,麻烦帮忙修改一下,谢谢!