rudolfelizabeth
Programmer
Id Linenumber Number Transdate Action Amount Balance Reference AliasBalBeginbaltotal3 AliasBalcarryforwardruntotal
2 0 100 31-03-2009 Deposit 50.00 0.00 No 657 75 110
3 0 100 31-03-2009 Withdrawal -15.00 0.00 Paymant electricity 75 110
5 0 100 28-04-2009 Deposit 25.00 0.00 75 135
8 0 100 31-08-2009 Withdrawal -50.00 0.00 75 85
AliasBalcarryforwardruntotal: DSum("Amount","transactions2","number=" & [number] & " and [Transdate]<=#" & Format([Transdate],"mm-dd-yyyy") & "#")
the first row should be 75 + 50 = 125
the second 125-15=110
the query gives for both fields with the same transaction date the same value the value of 110
Now I need also to the sum of positive amounts in the amounts field I used the following code
Sumofdeposits: DSum("Amount","transactions2","[amount]>0" and number=" & [number] & " and [Transdate]<=#" & Format([Transdate],"mm-dd-yyyy") & "#")
I dont get the correct values
2 0 100 31-03-2009 Deposit 50.00 0.00 No 657 75 110
3 0 100 31-03-2009 Withdrawal -15.00 0.00 Paymant electricity 75 110
5 0 100 28-04-2009 Deposit 25.00 0.00 75 135
8 0 100 31-08-2009 Withdrawal -50.00 0.00 75 85
AliasBalcarryforwardruntotal: DSum("Amount","transactions2","number=" & [number] & " and [Transdate]<=#" & Format([Transdate],"mm-dd-yyyy") & "#")
the first row should be 75 + 50 = 125
the second 125-15=110
the query gives for both fields with the same transaction date the same value the value of 110
Now I need also to the sum of positive amounts in the amounts field I used the following code
Sumofdeposits: DSum("Amount","transactions2","[amount]>0" and number=" & [number] & " and [Transdate]<=#" & Format([Transdate],"mm-dd-yyyy") & "#")
I dont get the correct values