参考:http://www.foxtable.com/webhelp/topics/1451.htm工资表,datacolchanged事件
If e.DataCol.Name = "身份证号码" Then
If e.NewValue Is Nothing Then
e.DataRow("工资") = Nothing
Else
Dim dr As DataRow= DataTables("表A").Find("[身份证号码] = '" & e.NewValue & "'")
If dr IsNot Nothing Then
Dim dr2 As DataRow= DataTables("工资标准").Find("[义教专技薪级] = '" & dr("薪级") & "'")
if dr2 isnot nothing then
e.DataRow("工资")= dr2("义教薪级标准")
end if
End If
End If
End If