Dim t1 As Table = Tables("窗口1_客户表")
Dim t2 As Table = Tables("窗口1_过磅表")
For Each r1 As Row In t1.Rows
If r1.IsNull("客户") = False AndAlso r1("过磅") = True Then
For Each r2 As Row In t2.Rows
If r1("过磅") = True And r2("过磅") = True Then
r2("编号") = r1("编号")
r1("过磅") = False
r1("已过磅") = True
r2("过磅") = False
r2("已过磅") = True
End If
Next
End If
Next
测试结果:
“客户表”的某一行的过磅列打钩,再在“过磅表”的任意几行的过磅列打钩,
结果发现,可以把选中的“客户表”的该行的过磅编号,复制给“过磅表”对应的这几行的其中第一行的过磅编号列,
但是,想要的效果是:把“客户表”的该行的过磅编号,复制给全部选中的这几行的过磅编号列?
[此贴子已经被作者于2019/4/30 10:00:59编辑过]