For Each dr1 As Row In Tables("职工信息表").Rows Dim dr2 As DataRow = DataTables("职工资料").Find("身份证号='" & dr1("身份证号") & "' and 学历 <> '" & dr1( "学历" ) & "'") If dr2 IsNot Nothing Then Tables("职工信息表").Position = dr1.Index dr1( "学历" ) = dr2( "学历" ) MessageBox.Show( dr1("姓名") & "的信息被替换"), End If Next