Select Case e.DataCol.Name Case "第四列" Dim dr1 As DataRow = e.DataRow Dim dr As DataRow dr = DataTables("表C").Find("[第二列] = '" & dr1("第二列") & "' and 第一列 = '" & Tables("表A").Current("组别") & "'") If dr IsNot Nothing Then MessageBox.Show("已存在!") Else Dim dr2 As Row =Tables("表A.表C").Rows.AddNew dr2("第二列")=dr1("第二列") End If End Select