Dim sts() As String = {"仓库","购货单位","出库日期","出库单号","付款单位","业务类别","销售类型"}
For Each st As String In sts
If Tables("出库主表").Current.isnull(st) = True Then
MessageBox.Show("请将单据填写完整!","提醒")
Return
End If
Next
Dim r As Row = Tables("出库明细表").AddNew
For Each st As String In sts
r(st) = Tables("出库主表").Current(st)
Next
Dim tbl As Table = Tables("销售提单登记_Table2")
If tbl.Current IsNot Nothing Then
If Tables("出库明细表").Rows.Count> 0 Then
Tables("出库明细表").Current("生产日期") = tbl.Current("生产日期")
Tables("出库明细表").Current("产地") = tbl.Current("产地")
Tables("出库明细表").Current("货物名称") = tbl.Current("货物名称")
Tables("出库明细表").Current("规格型号") = tbl.Current("规格型号")
Tables("出库明细表").Current("材质") = tbl.Current("材质")
Tables("出库明细表").Current("货位") = tbl.Current("货位")
Tables("出库明细表").Current("车号") = tbl.Current("车号")
If e.Row("仓库") <> Forms("销售提单登记").Controls("ComboBox1").text Then
MessageBox.Show("仓库名称不同!", "提示")
If MessageBox.Show("是否删除?","请确认",MessageBoxButtons.YesNo,MessageBoxIcon.Question)=DialogResult.Yes Then
Tables("出库明细表").Current.Delete
End If
End If
End If
End If
谢谢老师 这样完整了