以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  两个没有关联的数据表同步  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=70280)

--  作者:dj68301367
--  发布时间:2015/6/18 11:40:00
--  两个没有关联的数据表同步
超领料明细表中做了以下代码,但如果超领料申请单中数据有变更,明细表必需重置列才可以更新数据,能不能同步呀

Dim Ntb As Table =Tables("超领料明细")

Select Case e.DataCol.Name
    Case "物料编码"
        Dim Fil As String = "通知单号 = \'" & ntb.Current("通知单号") & "\' and 成品编码 = \'" & ntb.Current("成品编码") & "\' and 物料编码 = \'" & ntb.Current("物料编码") & "\'"
        ntb.Current("需求量") = DataTables("超领料申请单").Compute("Sum(不良数量)",fil)   
        
End Select

--  作者:Bin
--  发布时间:2015/6/18 11:41:00
--  
http://www.foxtable.com/help/topics/1472.htm