Kindly see how you can assist in another cumulative column under commission, I have done it for one column called sales is now showing cumulative with two criteria. How do I add another column called commission as cumulative as well?
SELECT T1.IDLine, T1.Monthend, T1.ProductCode, T1.Qty, T1.Commision, (SELECT Sum(tblLinedetails.QTY) As Total
WHERE (tblLinedetails.Monthend <= T1.Monthend) AND tblLinedetails.ProductCode = T1.ProductCode) AS Total
FROM tblLinedetails AS T1;
Well Dale Fye advised clearly the problem of slowness with ELookups & Dsum , I now totally agree with him that the way forward is to settle on Subqueries.