类似:
http://www.foxtable.com/webhelp/topics/1451.htm
表A,datacolchanged事件
Select Case e.DataCol.Name
Case "客户代号","客户图号"
Dim dr As DataRow = e.DataRow
Dim pr As DataRow
If dr.IsNull("客户代号")=false andalso dr.IsNull("客户图号") =false Then
Dim filter As String
filter = "客户代号 = '" & dr("客户代号") & "' And 客户图号 = '" & dr("客户图号") & "'"
pr = DataTables("表B").Find(filter)
If pr Is Nothing Then
pr = DataTables("表B").addnew
pr("客户代号") = dr("客户代号")
pr("客户图号") = dr("客户图号")
End If
End If
End Select