Display the last "n" records before the last in a MS Access Query
Posted on 2012-09-19
I have a table/query that lists the daily prices for particular commodities. The query is called qry_Prices and contains the following fields:
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:
where the date range is between the [LastDate/Record] and [LastDate/Record] - 10.
Hope that you can help!