Hi
I have the following query:
SELECT Products.Material, Products.Description, Products.[Q No], [Inventory Transactions].ProductID, Sum(nz([unitsreceived])-nz([unitssold])-nz([unitsshrinkage])) AS [units in stock], Products.Discontinued
FROM Products INNER JOIN [Inventory Transactions] ON Products.ProductID = [Inventory Transactions].ProductID
GROUP BY Products.Material, Products.Description, Products.[Q No], [Inventory Transactions].ProductID, Products.Discontinued
HAVING (((Sum(nz([unitsreceived])-nz([unitssold])-nz([unitsshrinkage])))<1));
Which returns all products in my database that have no stock. I would like to have the discontinued field (checkbox) ticked on all of these products. Access does not allow me to change any values manually and an update query doesn't like the maths in the above sql.
Anyhelp would be nice.
I have the following query:
SELECT Products.Material, Products.Description, Products.[Q No], [Inventory Transactions].ProductID, Sum(nz([unitsreceived])-nz([unitssold])-nz([unitsshrinkage])) AS [units in stock], Products.Discontinued
FROM Products INNER JOIN [Inventory Transactions] ON Products.ProductID = [Inventory Transactions].ProductID
GROUP BY Products.Material, Products.Description, Products.[Q No], [Inventory Transactions].ProductID, Products.Discontinued
HAVING (((Sum(nz([unitsreceived])-nz([unitssold])-nz([unitsshrinkage])))<1));
Which returns all products in my database that have no stock. I would like to have the discontinued field (checkbox) ticked on all of these products. Access does not allow me to change any values manually and an update query doesn't like the maths in the above sql.
Anyhelp would be nice.