Showing the last 2 records per person

R32chaos

Registered User.
Local time
Today, 15:20
Joined
Mar 19, 2007
Messages
43
I have a table which contains placement information for foster children and stores data based on their s/s #. For each s/s # I need to show not only the current placement, for which I have a check box field to refect that it is current, but I also need to show the record previous to that one. The previous record's "current" check box field will be blank and can be more than one. I need to have this query display the current record (based on the check box) and the one right before the current.

Is there any way to have the query show the record with CURRENT field checked as well as the record right before that one? In other words, the last two records only for each s/s #...

Your help will be grately appreciated!!

Thank you...:rolleyes:
 
Without seeing the database, I'd hazard a guess at a date field for the start of each placement? You could use this to filter on.

Q :)
 
If there is a field that identifies the order of the records with the "checked record" being the most recent record, and the record you want, as the previous record in that order, then I suggest you build a query of those records based on that field, then right click in the query builder pane and select "properties" you will see it a list of options, one is "Top Values" where you can specify the number of most recent records you want to display in this case you would enter "2".
 
Last edited:
Last 2 records per person

Thank you Mr. Q..your suggestion worked fantastic for me...although I had tried it, but i had to create a link within the query for that record versus the links created via subreport which was showing two records for the entire report.

Any way it worked...and I very much appreciate it!!!
 

Users who are viewing this thread

Back
Top Bottom