Select Case e.DataCol.name Case "开始日期" If e.NewValue > "" AndAlso e.DataRow.IsNull("请假人") = False Dim dr As DataRow = e.DataRow If e.DataTable.Find("请假人 = '" & dr("请假人") & "'and 开始日期 = '" & e.NewValue & "'") IsNot Nothing Then MessageBox.Show(" " & dr("请假人") & " " & e.NewValue &" 已输入!","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning) e.Cancel = True End If End If End Select