Getting data from a previous record

harix

Registered User.
Local time
Today, 18:59
Joined
Jul 21, 2000
Messages
14
I am trying to get/calculate a previous balance in a query (based on a table named File) that gets its criteria (an Account No) from a form to create the record set. I have to do calculations on the interest to be paid for the duration of the time between transactions. My record set is consecutively numbered and I use the following code:

PrevBalance: DLookUp("NZ([CurrentBalance],0) ","File "," [File]![TransactionNo] =" & [File]![TransactionNo]-1)

to get the previous balance and then calculate the current balance as:

CurrentBalance: NZ([PrevBalance],0)+NZ([Deposit],0)-NZ([PrincipalPd],0)

I get the starting current balance from the above - it is entered as a deposit. Current balance and PrevBalance are NOT fields in my table

I get weird numbers, HELP!@!!
 

Users who are viewing this thread

Back
Top Bottom