evaluate a field in the previous record

M

mewhite

I need a calculated field in a query that evaluates a field in the previous
record and returns a result when compared to that same field in the current
record:

IIF([value of field A of the previous record]=[value of field A of the
current record], [field B], [field C]
 
J

John Vinson

I need a calculated field in a query that evaluates a field in the previous
record and returns a result when compared to that same field in the current
record:

IIF([value of field A of the previous record]=[value of field A of the
current record], [field B], [field C]

An Access table does not *HAVE* "previous" or "next" records. It's an
unordered "heap" of data. As such, your question has no meaning.

What constitutes the "previous" record? Do you have some timestamp or
sequential ID that would allow you to find that record?

I'm VERY queasy about your table design; the value of a field in a
record should depend ONLY upon the primary key of that record, not
upon values of any other field in that record or of any other record.
Could you explain the real-world problem you're trying to model?

John W. Vinson[MVP]
 
Top