Dim dr2 As DataRow = e.DataRow
Select Case e.DataCol.Name
Case "物料编码","往来名称"
If dr2.IsNull(e.DataCol.Name) Then
dr2("单价") = Nothing
Else
Dim da As Date = e.DataRow("日期")
Dim fdr As DataRow = DataTables("销售出库明细").SQLfind("往来名称 ='" & dr2("往来名称") & "'And 物料编码 ='" & dr2("物料编码") & "'and 日期 <= #" & da & "#","日期 desc")
If fdr IsNot Nothing
dr2("单价") = fdr("单价")
End If
End If
End Select
提取当前表最近使用过的单价,哪里出问题了不起作用
Dim fdr As DataRow = DataTables("销售出库明细").SQLfind("往来名称 ='" & dr2("往来名称") & "'And 物料编码 ='" & dr2("物料编码") & "'and 日期 <= #" & da & "#","日期 desc")
上面句哪里出问题?????