以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  累计分数  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=75823)

--  作者:woshiabc
--  发布时间:2015/10/15 14:25:00
--  累计分数

图片点击可在新窗口打开查看此主题相关图片如下:jx_rp)lbo9z2n368v3@wjgv.png
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:jc$4~yh0`x}9$j6rm9(7dj.png
图片点击可在新窗口打开查看

下面为什么会报错 
图片点击可在新窗口打开查看
With e.Form

Dim dt1 As Date = .Controls("DateTimePicker1").value
Dim dt2 As Date = .Controls("DateTimePicker2").value
Dim dr As DataCol = e.DataCol
Dim hj As String=.controls("textbox1").value
Dim dt As DataTable =DataTables("仓库工作地图录入一览")
If e.DataCol.Name = "得分" And dr.IsNull("得分") = False And Filter = "提报日期 >= #" & dt1 & "# And 提报日期 <= #" & dt2 & "#"
 Then
    hj = dt.Compute("Sum(" & dr("得分") & ")")
    
End If

End With


--  作者:大红袍
--  发布时间:2015/10/15 15:03:00
--  
Dim dt1 As Date = e.Form.Controls("DateTimePicker1").Value
Dim dt2 As Date = e.Form.Controls("DateTimePicker2").value
Dim filter As String = "1=1"
If dt1 <> Nothing Then
    filter &= " and 日期 >= #" & dt1 & "#"
End If
If dt2 <> Nothing Then
    filter &= " and 日期 <= #" & dt2 & "#"
End If
e.Form.Controls("TextBox1").Text = DataTables("订单").Compute("sum(数量)", filter)