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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

expression using prior record attributes

Status
Not open for further replies.

TrollBro

Technical User
Sep 4, 2004
98
0
0
US
Hi

I need to create a field expression to evaluate two fields from a prior record but I'm not sure how to do it. I have a table with fields including dollar amounts and dates. I can Desc sort on dollars and then dates, and need a 3rd field that evaluates the preceeding dollar and date against the currect record's dollar and date values. If they are the same, the results should return a "Y", else a "n". Qry results would look like this:

Amount Date Flag
100 1/1/2009
120 1/15/2009 "N"
120 1/15/2009 "Y"


Is there an easy way to even do this in an access query? I have to resort to an xls spreadsheet. Thanks
 
thanks dhookem

It's been a while, but I thought from something I worked on a number of years ago that there was a way to also rank order in an expression as well, and the logic might be similar. I was hoping to avoid creating a DAO routine outside of the qry to loop through all the records to accomplish what I'm after, but maybe that's what I'm stuck with having to do.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top