I have a query with the following fields
-SubContractor
-OrderNo
-OrderValue
-InvoiceNo
-Total
One OrderNo can have several invoices. I am trying to get a cumulative invoice total for each OrderNo
I've tried the following formula but it is returning the total for each invoice for each order number
SubT: DSum("[Total]","qryPaymentsToDate2","[OrderNo]='" & [OrderNo] & "'" And "[InvoiceNo]<=" & [InvoiceNo])
Where did I go wrong? If I limit the criteria to OrderNo only it is giving me the total of the invoices for that order...close but I really need the running total after each invoice.
Please help
-SubContractor
-OrderNo
-OrderValue
-InvoiceNo
-Total
One OrderNo can have several invoices. I am trying to get a cumulative invoice total for each OrderNo
I've tried the following formula but it is returning the total for each invoice for each order number
SubT: DSum("[Total]","qryPaymentsToDate2","[OrderNo]='" & [OrderNo] & "'" And "[InvoiceNo]<=" & [InvoiceNo])
Where did I go wrong? If I limit the criteria to OrderNo only it is giving me the total of the invoices for that order...close but I really need the running total after each invoice.
Please help