代码如下If e.DataCol.Name = "姓名" Then
If e.NewValue Is Nothing Then
e.DataRow("抽成") = Nothing
e.DataRow("借支") = Nothing
Else
Dim Filter As String = "[姓名] = '" & e.NewValue & "'"
Dim m As Integer = e.DataRow("日期").Month
Dim y As Integer = e.DataRow("日期").Year
Dim dt1 As New Date(y, m, 1)
Dim dt2 As New Date(y, m, Date.DaysInMonth(y, m))
Filter = filter & " and 日期 >= #" & dt1 & "# And 日期 <= #" & dt2 & "#"
e.DataRow("抽成") = DataTables("抽成").Compute("Sum(抽成)",Filter)
e.DataRow("借支") = DataTables("借支表").sqlCompute("Sum(金额)",Filter)
End If
End If
表测试的时候,这个代码没有问题,但是5月份的时候客户反映借支金额只能统计30号以内的,31号的完全统计不到,以我的能力,完全查不出问题出在哪里
各位大佬帮忙看看