以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  错误提示  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=113193)

--  作者:有点甜
--  发布时间:2018/1/10 22:04:00
--  
都分别触发了什么事件?执行了什么代码?
--  作者:有点甜
--  发布时间:2018/1/10 22:24:00
--  

修改代码,看弹出什么

 

Select Case e.DataCol.Name
    Case "合格品","不合格品","报废品"
        Dim pr As DataRow
msgbox(1)
        pr = DataTables("生产排产表").Find("加工工序 = \'" & e.DataRow("加工工序") & "\' and 成品编码 = \'" & e.DataRow("成品编码")& "\' and 生产批次 = \'" & e.DataRow("生产批次")  & "\'")
msgbox(2)
If pr Is Nothing Then
msgbox(3)
            pr = DataTables("生产排产表").sqlFind("加工工序 = \'" & e.DataRow("加工工序") & "\' and 成品编码 = \'" & e.DataRow("成品编码")& "\' and 生产批次 = \'" & e.DataRow("生产批次")  & "\'")
  End If
msgbox(4)
 If pr IsNot Nothing Then
msgbox(5)
            pr(e.DataCol.Name)= e.DataTable.sqlCompute("sum(" & e.DataCol.Name & ")", "加工工序 = \'" & e.DataRow("加工工序") & "\' and 成品编码 = \'" & e.DataRow("成品编码") & "\' and 生产批次 = \'" & e.DataRow("生产批次")& "\' and _Identify <> " & e.DataRow("_Identify")) + e.DataRow(e.DataCol.Name)
      pr.save
        End If        
msgbox(6)
End Select

--  作者:有点甜
--  发布时间:2018/1/10 22:42:00
--  

1、弹出这个看看

 

msgbox("加工工序 = \'" & e.DataRow("加工工序") & "\' and 成品编码 = \'" & e.DataRow("成品编码") & "\' and 生产批次 = \'" & e.DataRow("生产批次")& "\' and _Identify <> " & e.DataRow("_Identify"))

 

2、试试改成

 

SystemReady = False

pr(e.DataCol.Name)= e.DataTable.sqlCompute("sum(" & e.DataCol.Name & ")", "加工工序 = \'" & e.DataRow("加工工序") & "\' and 成品编码 = \'" & e.DataRow("成品编码") & "\' and 生产批次 = \'" & e.DataRow("生产批次")& "\' and _Identify <> " & e.DataRow("_Identify")) + e.DataRow(e.DataCol.Name)

SystemReady = True


--  作者:有点甜
--  发布时间:2018/1/10 23:05:00
--  
改成6楼的代码,再测试。