With Tables("销售_开piao") If .Rows.Count > 0 Then If .Current.DataRow.RowState = DataRowState.Unchanged Then '如果当前行未曾修改 .AddNew() CurrentTable.current.locked= False Return Else MessageBox.Show("该记录已经被修改,请先保存! ") End If Else .AddNew() CurrentTable.current.locked= False End If End With