The Control Source is =DSum"LineTotal","OrdersForStatsQ","OrderDate>=#" & Date()-30 & "#").The OrderForStatsQ uses OrderDate from OrderT, LineTotal: [Quantity]*[UnitPrice]and IsPaid from OrderT.
Reply from Alex Hedley:
I don't think the LineTotal includes the discounts so if you wanted it to your ExtPrice2 Field would be better
Keith Stanton
@Reply 5 years ago
I forgot about the discount until reading this thread. I went back and changed the tables in the OrderForStatsQ from OrderT, OrderDetailT and ProductT to OrderT and OrderDetailQ. Pulled the LineTotal from the OrderDetailQ which already has the discounts calculated in. That also meant I was still able to use the same DSUM example as the field name of LineTotal was the same either way.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 11.