如何将下面代码改成,需求:
主表的“订单属性,入库类型,仓库名,入库部门,入库单位,制单人,UserID,红冲单号”这些字段的任一字段修改,明细也跟着修改?
If e.DataCol.Name = "仓库名" Then '
Dim drs As List(Of DataRow)
drs = e.DataRow.GetChildRows("入库明细")'
For Each dr As DataRow In drs
If dr("审核") = False Then '
dr("订单属性") = e.DataRow("订单属性")
dr("入库类型") = e.DataRow("入库类型")
dr("仓库名") = e.DataRow("仓库名")
dr("入库部门") = e.DataRow("入库部门")
dr("入库单位") = e.DataRow("入库单位")
dr("入库日期") = e.DataRow("入库日期")
dr("制单人") = e.DataRow("制单人")
dr("UserID") = e.DataRow("UserID")
dr("红冲单号") = e.DataRow("红冲单号")
End If
Next
ElseIf e.DataCol.Name = "入库单号" AndAlso Forms("入库登记").opened Then
Tables("入库登记_入库明细").Filter = "入库单号='" & e.NewValue & "'"
End If