代码如下:
If e.DataCol.Name = "dnd_cust" Then
If e.NewValue Is Nothing Then
e.DataRow("dnd_add") = Nothing
e.DataRow("dnd_conta") = Nothing
e.DataRow("dnd_phone") = Nothing
Else
Dim dr As DataRow
dr = DataTables("cm_mstr").Find("[cm_cust] = '" & e.NewValue & "'")
If dr IsNot Nothing Then
e.DataRow("dnd_add") = dr("cm_add")
e.DataRow("dnd_conta") = dr("cm_conta")
e.DataRow("dnd_phone") = dr("cm_phone")
End If
End If
End If
填入dnd_det表中的dnd_cust,将cm_mstr表中的cm_add,cm_conta,cm_phone调用到dnd_det表中的dnd_add,dnd_conta,dnd_phone列。(dnd_cust与cm_cust为同一值)。
此主题相关图片如下:提示.png