G
GabbyB via AccessMonster.com
I used your example on a running sum that I am working on. The problem I
have is that I'm trying to run a sum on my "previous" invoices only. The
problem I have, using your example:
Subtotal: DSum("[Payment]", "[YourTableName]", "[FleetNo] = " &
is that my formula ends with AND InvDate < #"&[InvDate]&"#") because I only
want it to add up the records from previous invoices, not including the
current. However, the first record (which has no previous record) errors out.
I tried to put in an Iif(ISERROR statement, but that didn't work either. Any
suggestions?
Here is my query formula:
Prev: Format(DSum("[ThisPeriod]","[tblBillingDetails]","tblBillingDetails.
[CSDID] = " & [tblBillingDetails].[CSDID] & " AND [Date] < #" & [Date] & "#")
have is that I'm trying to run a sum on my "previous" invoices only. The
problem I have, using your example:
Subtotal: DSum("[Payment]", "[YourTableName]", "[FleetNo] = " &
[FleetNo] & " AND PaymentDate <= #" & [PaymentDate] & "#")
is that my formula ends with AND InvDate < #"&[InvDate]&"#") because I only
want it to add up the records from previous invoices, not including the
current. However, the first record (which has no previous record) errors out.
I tried to put in an Iif(ISERROR statement, but that didn't work either. Any
suggestions?
Here is my query formula:
Prev: Format(DSum("[ThisPeriod]","[tblBillingDetails]","tblBillingDetails.
[CSDID] = " & [tblBillingDetails].[CSDID] & " AND [Date] < #" & [Date] & "#")