Using a value from a previous Record to Perform a Calculation?

A

acetiger59

I have a Append query that looks up a particular date range I specify and
gives me a count, for received and loaded dates that meet that range. From
those 2 numbers the query also subtracts Received - Loaded=Backlog. See
below

TABLE - tbl_TOTALS OPPD
ID Received Loaded Backlog New
Backlog
1 0 0 0
0
2 5 3 2
??????

What I need is for the query to lookup the New Backlog value from the
previous record and perform this calculation on the same query....
Previous New Backlog + New Received - New Loaded = New Backlog

I have used the formula below in the same append query however it does
return the value, it returns a blank to the table:
Expr1: DLookUp("[New Back Log]","tbl_TOTALS OPPD","[ID]=" &
[ID]-1)+ [Received] - [Loaded]

I append these values to the table (tbl_TOTALS OPPD). The query works for
everything but the New Backlog.

Any help will be GREATLY
APPRECIATED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top