qrySalesCount counts products sales (the FO part of FIFO):
Now I am tying to workout the FI part of FIFO. I created new query qryFIFO with qrySalesCount and tblPurchaseDetails linked on ProductID field.
But when I run it it crashes Access. Tried compacting and also importing all objects into a new blank database = did not help.
Without going into qryFIFO's code and logic (I have not finished it yet), what might be the problem? Are there in Access built-in query limits that cause crash when you try to query something not logical or to heavy?
Code:
SELECT T1.ProductID, tblProduct.ProductName, T1.OrderID, tblOrder.OrderDate, T1.Quantity, T1.UnitCost,
(SELECT Sum(tblOrderDetails.Quantity) AS Total FROM tblOrderDetails
WHERE tblOrderDetails.OrderDetailsID <= T1.OrderDetailsID and tblOrderDetails.ProductID=t1.ProductID) AS Total
FROM tblProduct INNER JOIN (tblOrder INNER JOIN tblOrderDetails AS T1 ON tblOrder.OrderID = T1.OrderID) ON tblProduct.ProductID = T1.ProductID
But when I run it it crashes Access. Tried compacting and also importing all objects into a new blank database = did not help.
Without going into qryFIFO's code and logic (I have not finished it yet), what might be the problem? Are there in Access built-in query limits that cause crash when you try to query something not logical or to heavy?
Last edited: