DSum Problem

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

This DSum works until I add the Sent criteria, anyhelp appreciated.
Thanks
DS

Me.Text5 = Nz(DSum("[BasePrice]*[QtyPrice]", "SalesDetailsMoney",
"[SalesID] = " & Forms!CheckPreview!TxtSalesID & " And [Sent] = -1"), 0)
End Sub
 
Is [Sent] a yesno field? Is it included in your query? It would help to know
more than just "works until". You didn't say anything about why you think it
didn't work.
 
Duane said:
Is [Sent] a yesno field? Is it included in your query? It would help to know
more than just "works until". You didn't say anything about why you think it
didn't work.
Sent is a yes/no field. And it returns notning after I add the field.
Thanks
DS
 
"returns nothing"? Do you mean it doesn't even return a 0?
I would open the query and enter SQL like the following to see if you can
tell your issue:

SELECT SUM([BasePrice]*[QtyPrice]) as PriceQty
FROM SalesDetailsMoney
WHERE [SalesID] = Forms!CheckPreview!TxtSalesID And [Sent] = -1;

--
Duane Hookom
MS Access MVP


DS said:
Duane said:
Is [Sent] a yesno field? Is it included in your query? It would help to
know more than just "works until". You didn't say anything about why you
think it didn't work.
Sent is a yes/no field. And it returns notning after I add the field.
Thanks
DS
 
Duane said:
"returns nothing"? Do you mean it doesn't even return a 0?
I would open the query and enter SQL like the following to see if you can
tell your issue:

SELECT SUM([BasePrice]*[QtyPrice]) as PriceQty
FROM SalesDetailsMoney
WHERE [SalesID] = Forms!CheckPreview!TxtSalesID And [Sent] = -1;
Thanks Duane, I found the problem, the Sent field was deleted from the
table!
My aplolgies. and thanks for the response.
DS
 
Back
Top