How do I pick the previous record to use it in the next record ca.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,
Im starting to use access and i want to make an accummulation function that
gets the previous record value to sum it in the new record calculation,
really easy to do using excel but i dont know how to do this as a query
expression.

Thanks for any comment
 
Hi All,
Im starting to use access and i want to make an accummulation function that
gets the previous record value to sum it in the new record calculation,
really easy to do using excel but i dont know how to do this as a query
expression.

Excel is a spreadsheet, the best of the bunch.
Access is a relational database.

THEY ARE DIFFERENT.

One important way in which a spreadsheet differs from a Table is that
it has row numbers. A Table has none; it's an unordered "heap" of
data. There is no such thing as "the previous record", any more than
there is a previous or a next potato in a sack of potatoes.

You'll need to use DLookUp using some criteria using fields actually
in the record to identify which potato - err, record - is "the
previous" one in your case. What's in these records? Is there a
timestamp field, a sequential number, anything else which can identify
which record is which?

John W. Vinson[MVP]
 
Yes I have the date field, I started using this expression as you said, but
doesnt work with "date", instead I tried using ID and I got the value that i
was looking for:

EX1: DLookUp("[Volume]";"Record";"[ID]=" & [ID]-1)

After doing this I need to use EX1 as a new field on a new expression like
this:
EX2: DLookUp("[EX1]";"Query1";"[ID]=" & [ID]-1)....And this last expression
doesnt work....why? Is not possible to do the same on a query? do only work
 
Back
Top