Dim nms() As String = {"条码"} '不允许为空的列名 Dim r As Row = Tables("采购列表.采购明细").Current If DataTables("采购明细").DataRows.Count = 0 Then Forms("采购明细").Close() Else For Each nm As String In nms If r.isnull(nm) Then messagebox.show(nm & "必须输入内容") Return End If Next r.Save End If