有点蓝老师,这是我写的代码,蓝色代码得到的值会把橙色代码得到的值覆盖掉,我想两个值同时存在,该怎么改??请老师赐教,谢谢
If e.DataCol.Name = "姓名" Then
If e.NewValue Is Nothing Then
e.DataRow("性别") = Nothing
e.DataRow("年龄") = Nothing
e.DataRow("毕业学校") = Nothing
Else
Dim dr As DataRow
Dim dr2 As DataRow
dr = DataTables("表B").Find("[姓名] = '" & e.NewValue & "'")
dr2 = DataTables("表C").Find("[姓名] = '" & e.NewValue & "'")
If dr IsNot Nothing
e.DataRow("性别") = dr("性别")
e.DataRow("毕业学校") = dr("学历")
End If
If dr2 IsNot Nothing
e.DataRow("年龄") = dr2("年龄")
e.DataRow("毕业学校") = dr2("学校")
End If
End If
End If