D
dirtrhoads
I created an inventory query in Access 2007 much like the Northwind 2007
query, but the fields that are supposed to calculate a total are returning
nothing at all.
My SQL statements is:
SELECT Products.Product_Name, [Quantity Produced]-[Quantity Shipped] AS [Qty
On Hand], Nz([Quantity Shipped],0) AS [Qty Shipped], Nz([Quantity
Allocated],0) AS [Qty Allocated], Nz([Quantity on Backorder],0) AS [Qty on
Backorder], ([Quantity Produced]-[Quantity Shipped]-[Quantity
Allocated]-[Quantity on Backorder]) AS [Qty Available], Nz([Quantity
Produced],0) AS [Qty Produced]
FROM (((Products LEFT JOIN [Product Allocated at Belmont] ON
Products.Product_ID=[Product Allocated at Belmont].Product) LEFT JOIN
[Product Backorder at Belmont] ON Products.Product_ID=[Product Backorder at
Belmont].Product) LEFT JOIN [Product Inbound at Belmont] ON
Products.Product_ID=[Product Inbound at Belmont].Product) LEFT JOIN [Product
Shipped from Belmont] ON Products.Product_ID=[Product Shipped from
Belmont].Product;
If my fields Qty Allocated, Qty On Backorder, Qty Shipped, and Qty Produced
are 0 then Qty on Hand and Qty Available return nothing at all. However, if
there is a value > 0 in any of the fields, then the calculation will
calculate properly.
I compared my statement to the statement in Northwind and don't see much of
difference. Can someone please educate me a little further?
Thank you,
Amy
query, but the fields that are supposed to calculate a total are returning
nothing at all.
My SQL statements is:
SELECT Products.Product_Name, [Quantity Produced]-[Quantity Shipped] AS [Qty
On Hand], Nz([Quantity Shipped],0) AS [Qty Shipped], Nz([Quantity
Allocated],0) AS [Qty Allocated], Nz([Quantity on Backorder],0) AS [Qty on
Backorder], ([Quantity Produced]-[Quantity Shipped]-[Quantity
Allocated]-[Quantity on Backorder]) AS [Qty Available], Nz([Quantity
Produced],0) AS [Qty Produced]
FROM (((Products LEFT JOIN [Product Allocated at Belmont] ON
Products.Product_ID=[Product Allocated at Belmont].Product) LEFT JOIN
[Product Backorder at Belmont] ON Products.Product_ID=[Product Backorder at
Belmont].Product) LEFT JOIN [Product Inbound at Belmont] ON
Products.Product_ID=[Product Inbound at Belmont].Product) LEFT JOIN [Product
Shipped from Belmont] ON Products.Product_ID=[Product Shipped from
Belmont].Product;
If my fields Qty Allocated, Qty On Backorder, Qty Shipped, and Qty Produced
are 0 then Qty on Hand and Qty Available return nothing at all. However, if
there is a value > 0 in any of the fields, then the calculation will
calculate properly.
I compared my statement to the statement in Northwind and don't see much of
difference. Can someone please educate me a little further?
Thank you,
Amy