以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]数据录入,能同时更新其它提定的表吗 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=169034) |
-- 作者:糊涂晴天 -- 发布时间:2021/5/30 18:02:00 -- [求助]数据录入,能同时更新其它提定的表吗 请教大神们:订单表录入订单信息时,怎么实现订单编号、产品名称同步录入到订单生产进度表、注塑生产进度表、表面处理生产进度表、装配生产进度表? |
-- 作者:有点蓝 -- 发布时间:2021/5/30 20:49:00 -- 参考:http://www.foxtable.com/webhelp/topics/1451.htm 可以先查询需要同步的表,如果没有这个订单号,可以先新增,有就直接更新,比如 If e.DataCol.Name = "产品编号" Then Dim nms() As String = {"品名","型号","规格","单价"} If e.NewValue Is Nothing Then For Each nm As String In nms e.DataRow(nm) = Nothing Next Else Dim dr As DataRow dr = DataTables("产品").Find("[产品编号] = \'" & e.NewValue & "\'") If dr Is Nothing dr = DataTables("产品").addnew dr("产品编号") = e.NewValue End If For Each nm As String In nms
e.DataRow(nm) = dr(nm) Next End If End If |
-- 作者:糊涂晴天 -- 发布时间:2021/5/30 21:34:00 -- 非常感谢 |