Select Case e.DataCol.Name Case "姓名","罚款人1","罚款人2","罚款人3","罚款人4" Dim fdr As DataRow = DataTables("目录").Find("姓名 = '" & e.newValue & "'") If fdr Is Nothing Then MessageBox.Show(e.DataCol.name & "输入错误","提示") e.DataRow.SetError(e.DataCol.name, "姓名输入错误") Else e.DataRow.SetError(e.DataCol.name, "") 'e.cancel = True End If End Select