以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  不知道怎么写标题了  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=130019)

--  作者:yetle
--  发布时间:2019/1/11 9:50:00
--  不知道怎么写标题了

图片点击可在新窗口打开查看此主题相关图片如下:111.png
图片点击可在新窗口打开查看
如何按上图依行记录计算或取开始扎号和结束扎号
Dim tbl1 As Table = Tables("分派工序_table1")
Dim tbl4 As Table = Tables("分派工序_table4")
Dim tbl3 As Table = Tables("分派工序_table3")
Dim tbl6 As Table = Tables("分派工序_table6")
Dim bz As WinForm.ComboBox = Forms("分派工序").Controls("ComboBox1")
Dim js As WinForm.TextBox = Forms("分派工序").Controls("TextBox8")
If js.text <> Nothing Then
     If tbl1.current IsNot Nothing  Then
             Dim r = tbl3.addnew() 
       \'r("制单明细行ID") = tbl1.current("_Identify")
       r("物供号") = tbl1.current("物供号")
       r("系列") = tbl1.current("系列")
       r("颜色") = tbl1.current("颜色")
       r("货品名") = tbl1.current("货品名")
       r("客款号") = tbl1.current("客款号")
       r("款号") = tbl1.current("款号")
       r("制单号") = tbl1.current("制单号")
       r("订单号") = tbl1.current("订单号")
       r("每箱件数") = js.text
       r("箱数") = tbl6.Compute("Sum(数量)", "订单号 = \'" & r("订单号") & "\' and 颜色 = \'" & r("颜色") & "\' and 尺码 = \'" & r("尺码") & "\'") \\ r("每箱件数")
       r("尾箱数量") = tbl6.Compute("Sum(数量)", "订单号 = \'" & r("订单号") & "\' and 颜色 = \'" & r("颜色") & "\' and 尺码 = \'" & r("尺码") & "\'") Mod r("每箱件数")
       tbl3.Position = tbl3.rows.count-1
Tables("分箱").save()
      Else
        messagebox.show("请选择订单!")
      End If
Else
    messagebox.show("件数必填!")
End If
[此贴子已经被作者于2019/1/11 9:51:19编辑过]

--  作者:有点甜
--  发布时间:2019/1/11 9:57:00
--  

1、参考代码

 

Dim xs = tbl3.compute("sum(箱数)", "订单号 = \'" & r("订单号") & "\' and 颜色 = \'" & r("颜色") & "\' and 尺码 = \'" & r("尺码") & "\' and _sortkey < " & r("_sortkey"))

msgbox(xs+1)

 

2、类似参考

 

http://www.foxtable.com/webhelp/scr/1572.htm

 


--  作者:yetle
--  发布时间:2019/1/12 8:52:00
--  
好了,谢谢老师
[此贴子已经被作者于2019/1/12 9:32:36编辑过]