老师再看看,这样给对了,C表的数据还是没有引用过来
If e.DataCol.Name = "客户编号" Then
If e.NewValue Is Nothing Then
e.DataRow("下单日期") = Nothing
e.DataRow("客户名称") = Nothing
e.DataRow("订单金额") = Nothing
e.DataRow("预付定金") = Nothing
e.DataRow("未付余款") = Nothing
e.DataRow("增单金额") = Nothing
Else
Dim dr As DataRow
dr = DataTables("订单").Find("[客户编号] = '" & e.NewValue & "'")
If dr IsNot Nothing
e.DataRow("下单日期") = dr("下单日期")
e.DataRow("客户名称") = dr("客户名称")
e.DataRow("订单金额") = dr("订单金额")
e.DataRow("预付定金") = dr("预付定金")
e.DataRow("未付余款") = dr("未付余款")
e.DataRow("增单金额") = Nothing
End If
dr = DataTables("订单增收").Find("[客户编号] = '" & e.NewValue & "'")
If dr IsNot Nothing
e.DataRow("增单金额") = dr("增单金额")
End If
End If
End If