Hi
I am sure this is simple if you have more experience with running sum queries, however I have never needed one before.
Code:
SELECT tblConstOrder.Job, tblConstOrder.OrderNumber, tblConstOrderDetail.Order,
tblConstOrderDetail.Quantity, tblConstOrderDetail.UnitCost,
[Quantity]*[UnitCost] AS LineCost,
DSum([Quantity]*[UnitCost],"tblConstOrderDetail","[OrderNumber]=" & [OrderNumber]) AS Expr1
FROM tblConstOrder INNER JOIN tblConstOrderDetail ON tblConstOrder.OrderNumber = tblConstOrderDetail.Order;
What I am doing is storing the unit cost and the quantity in my order details table, now I want to calculate the line cost that is q by cost and at the same time know how much I am already commited for in total dollars.
Sounds simple enough to manage in one query as then I can make it the source for teh form and interact with the forms job numbers consequently always on budget (well hopefully anyway).
I could do with some help on DSum([Quantity]*[UnitCost],"tblConstOrderDetail","[OrderNumber]=" & [OrderNumber]) AS Expr1 as it seems no matter what I make OrderNumber or Order I keep getting cartesian products.