Link to home
Start Free TrialLog in
Avatar of staceymoore
staceymoore

asked on

Display the last "n" records before the last in a MS Access Query

Hello

I have a table/query that lists the daily prices for particular commodities.  The query is called qry_Prices and contains the following fields:

Commodity_Name
Price_Date
Price_Amount

What I want to do is ultimately create a report/graph that shows the price movement over the past 10 days from the last inputted date for each commodity (don't worry too much about whether each commodity will have a differenct "last" date.  This is not the case since prices are inputted for each commodity daily so the last date will always be the same).  The last inputted date always is the last record.

The results in the query will obviously "roll" since I will be entering a price everyday so I need something like:

[Last Entered Date] - 10

So, in summary I would like to see:

Commodity_Name
Price_Date
Price_Amount

where the date range is between the [LastDate/Record] and [LastDate/Record] - 10.

Hope that you can help!
ASKER CERTIFIED SOLUTION
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of staceymoore
staceymoore

ASKER

thanks again for your assistance!
Welcome!