Sel ect Case e.DataCol.Name Case "编号","姓名", If e.DataRow.Isnull("编号") = False Dim dr As DataRow dr = DataTables("表A").SQLFind("[编号] = '" & e.DataRow("编号") & "'" ) ’表A编号不允许重复 If dr Is Nothing Then dr = DataTables("表A").AddNew() dr("编号") = e.DataRow("编号") End If dr("姓名") = e.DataRow("姓名") End If