I have a query that filters results for products which have had orders sent after an user-input date, and calculates what the quantity becomes if the order was sent after that date.
SELECT id, ProductName,
[OnHand]+ SUM([OrderJoin.Quantity]) AS Qty After
WHERE Query3.ShippedDate > [Enter End Date] And
Query3.ShippedDate) Is Not Null
GROUP BY id, ProductName, OnHand;
You would use
NZ() to convert the
NULL value to
0. Something like this:
SELECT id, ProductName, NZ(OnHand, 0) + NZ(SUM([OrderJoin.Quantity]), 0) AS QtyAfter ...