麻烦大大帮我看看,真的是谢谢大大每次的快速反映,先谢过了。(先直接贴代码了)
一、在采购到货单,选择采购单窗口,的代码如下:
Dim Cols1() As String = {"订单编号","订单日期","供应商名称","存货编码","存货中文名","规格型号","品牌","主计量单位","数量"}
Dim Cols2() As String = {"订单编号","订单日期","供应商名称","存货编码","存货中文名","规格型号","品牌","主计量单位","数量"}
Dim count As Integer = 0
For Each r1 As Row In Tables("采购单选择_table1").GetCheckedRows
Dim t As Table = Tables(vars("采购表名"))
Dim r2 As Row
If count = 0 Then
r2 = t.current
Else
r2 = t.addnew
End If
count += 1
For i As Integer = 0 To Cols1.Length -1
r2(Cols2(i)) = r1(Cols1(i))
Next
Next
Forms("采购单选择").close
二、采购到货单的afterload事件如下
vars("采购表名") = "采购到货单"
与此相关的也就是这两段代码了。