以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  如何实现输入数据自动累计  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=23822)

--  作者:lyfxybc
--  发布时间:2012/9/20 20:02:00
--  如何实现输入数据自动累计
我有一个生产录入表,
[此贴子已经被作者于2020/3/19 19:53:24编辑过]

--  作者:布莱克朱
--  发布时间:2012/9/20 20:24:00
--  
 If e.DataCol.Name = "第二列" Then
    If e.DataRow.IsNull("第二列") Then
        e.DataRow("第一列") = Nothing
    Else
        e.DataRow("第一列") = e.DataRow("第一列") + e.DataRow("第二列")
    End If
End If

--  作者:lin_hailun
--  发布时间:2012/9/20 23:47:00
--  
 把上面的代码放到 表属性->事件->DataColChanged

 http://www.foxtable.com/help/topics/0625.htm