beforeSaveDataRow事件也要写代码,
Dim cls() As String ={"生产批次", "使用设备","加工工序", "姓名","班次","循环时间","线别", "批次序号", "开始日期", "成品编码", "成品描述", "合格品", "线别"}For Each c As String In cls If e.DataRow.isnull(c) Then msgbox(c & "不能为空") e.cancel = True Return End IfNext