If e.DataCol.Name = "某一列" AndAlso e.NewValue > "" Then Dim dr As DataRow dr = DataTables("来源表").Find("某一列 = '" & e.NewValue & "'") If dr Is Nothing Then MessageBox.Show("必须输入某某表已经存在的内容!") e.Cancel = True End IfEnd If