If e.DataCol.Name = "实际公斤数" Then '发生变化的是客户名吗?
Dim dd As DataRow
dd= DataTables("运单入账").Find("发货单号 = " & "'" & e.DataRow("发货单号") & "'" )
If dd Isnot Nothing Then '如果表B中不存在相同的记录
if dd.isnull("总斤数") = true OrElse dd.isnull("单价") = true
dd("运费")= 0
else
dd("运费")= dd("总斤数") * dd("单价")
End If
End If
End If
[此贴子已经被作者于2013-12-13 12:03:01编辑过]