分页依据指定
Dim Filter As String
Dim y As Integer = Date.Today.Year
Dim m As Integer = Date.Today.Month
Dim dt1 As New Date(y, m, 1)
Dim dt2 As New Date(y, m, Date.DaysInMonth(y, m)) '获取本月的最后一天
e.Form.Controls("startdate").value=Dt1
e.Form.Controls("enddate").value=Dt2
'Filter ="日期 >= '" & dt1 & "' And 日期 <= '" & dt2 & "' and 单据性质='费用单'"
'Filter ="日期 >=#" & dt1 & "# And 日期 <=#" & dt2 & "#" & "and 单据状态='已审核'"
Filter ="日期 >=#" & dt1 & "# And 日期 <=#" & dt2 & "#"
With DataTables("销售单")
.LoadFilter = ""
.LoadFilter = filter
.LoadOver="_Identify"
.LoadPage = 0 '加载第一页
.LoadTop =60 '每页60行
.Load()
e.Form.Controls("TextBox1").Value = 1 & "/" & .TotalPages
End With
........