Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referring to previous record in my query

Status
Not open for further replies.

VBAguy22

IS-IT--Management
Aug 5, 2003
180
CA
Hi All,
How would I refer to the element in my field on the previous record? Say I want to multiply the value of field [factor] by the value of the field [factor] in the previous record?
 
you can't, at least not easily.

there's no native order in your tables, so you would need to "find" the previous record, based on a set of criteria of your choosing, then you can open the previous record, and do the calculations...

--------------------
Procrastinate Now!
 
on the previous record
Have you a non ambiguous sorting scheme ?
If an ORDER BY clause guarantees the relative position of ALL records in the resultset then you may consider a "running total"-like query.
Feel free to post the exact layout of the table(s), some input samples and expected result.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top