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
Else
Dim dr As DataRow
dr = DataTables("产品销售记录表").Find("[购货单位] = '" & e.NewValue & "' And [规格型号] = '" & e.NewValue & "' And [销售数量] = '" & e.NewValue & "'")
If dr IsNot Nothing Then
e.DataRow("地址") = dr("地址")
e.DataRow("下单日期") = dr("下单日期")
e.DataRow("发货日期") = dr("发货日期")
e.DataRow("税价") = dr("税价")
e.DataRow("税率") = dr("税率")
End If
End If
End If
问题:
报错:= '",
[销售数量] = '" & e.NewValue是如何?
e.NewValue表示的是触发的列的值,这里表示是"购货单位"的值。其它列使用e.datarow获取
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
Else
Dim dr As DataRow
dr = DataTables("产品销售记录表").Find("[购货单位] = '" & e.NewValue & "' And [规格型号] = '" & e.NewValue & "' And [销售数量] = '" & e.NewValue & "'")
If dr IsNot Nothing Then
e.DataRow("地址") = dr("地址")
e.DataRow("下单日期") = dr("下单日期")
' e.DataRow("发货日期") = dr("发货日期")
' e.DataRow("税价") = dr("税价")
' e.DataRow("税率") = dr("税率")
End If
End If
End If
执行后,没报错,也没有反应,如何解决?
认真看2楼 [规格型号] = '" & 其它列使用e.datarow获取 & "'