I have a ledger. The ledger contains lines, and when entering data, you indicate if its a debit or credit. I then run a query, that collects that data.
Debit: IIf([Ledger]![Type]="Debit",[Ledger]![Amount],0)I then want to run a running total. This is the first part.Credit: IIf([Ledger]![Type]="Credit",[Ledger]![Amount],0)
This part works, however, I'm trying to use just one ledger. I only want it to sum if the company matches. Currently it sums everything, and I want to have different companies.DebitRunningSum: DSum("[Debit]","[Query1]","[ID]<=" & [ID])