你在客户表的DataColChanged事件的代码是:
Select Case e.DataCol.name
Case "医院名称","安装科室"
Dim dr As DataRow = e.DataRow
If dr.IsNull("医院名称") = False AndAlso dr.IsNull("安装科室") = False Then
If e.DataTable.Compute("Count([_Identify])","医院名称 = '" & dr("医院名称") & "' And 安装科室 = '" & dr("安装科室") & "'") > 1 Then
MessageBox.Show("该客户已经登记过了!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.DataRow(e.DataCol.Name) = e.OldValue '取消输入
End If
End If
End Select
有提示,就是有重复啊,自己写的代码,自己分析一下。