老师,可以帮忙修改一下以下代码吗 ? 感谢了。
If e.Col.Name ="GSSPartNo"
If e.Col.name = "Customer_PartNo"
If e.Table.compute("count(Customer_PartNo)","Customer_PartNo='" & e.Row("Customer_PartNo") & "' and BoxNo='" & e.Row("BoxNo") & "'")> 1 Then
msgbox("该物料不是单独包装的!!!")
Else
e.Cancel =True
Dim r As Row = Tables("PackingInfo").AddNew
r("CustomerPN") = e.Row("Customer_PartNo")
r("GSSPartNo") = e.Row("GSSPartNo")
r("Packing_Length") = e.Row("Box_Length")
r("Packing_Width") = e.Row("Box_Width")
r("Packing_Height") = e.Row("Box_Height")
r("Packing_GrossWeight") = e.Row("Gross_Weight")
r("Packing_Qty") = e.Row("Qty_perBox")
Forms("窗口2").open
End If
End If
e.cancel = True
End If