If e.DataCol.Name = "简称" Then Dim dr As DataRow = e.DataTable.Find("简称 = '" & e.NewValue & "'") If dr IsNot Nothing Then MessageBox.Show("此'简称'已存,不能重复录单!","提醒") e.newvalue += "-" & e.DataTable.compute("count(简称)", "简称 like '" & e.NewValue & "-%' and _Identify <> " & e.DataRow("_Identify")) + 1 End If End If