If e.Form.Controls("DropBox1").Text = "" Then MessageBox.Show("车牌为空,不允许删除该条数据.") Else Dim Result As DialogResult Result = MessageBox.Show("是否删除该条数据?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If Result = DialogResult.Yes Then Tables("维修单.配件项目").Current.Delete End If End If