View Full Version : Top n for each employee


tzimak
07-19-2001, 11:24 AM
Hi all

I have seen similar questions to this one throughout the forum, but no answers. Maybe it's just not possible?

How do I display (either through a Query or on a Report) the top 3 values (or the last 5 records) for each employee? There is a option to display the top 3 values of the whole entire table, but not unique to the employee. Would I have to combine ONE query for each employee (yikes) and then somehow append them all together?

Thanks in advance.
Tasmin Zimak

jstutz
07-19-2001, 12:44 PM
I did a quick test on a form that should also work for a report. Basically, I have a form and a subform linked by a key value.

I then created a query that said select the Top 3 records based on the key value displayed on the form and used that query to populate the subform. Worked like a charm. I should think the same would also apply to a report.

Let me know if this doesn't make sense and I can explain in a bit more detail, but I'm running out the door right now! http://www.access-programmers.co.uk/ubb/smile.gif

Good luck!

jamie

raskew
07-20-2001, 02:13 AM
See http://bbs.elementkjournals.com/bbs/showthreaded.pl?Cat=&Board=ima&Number=58509

tzimak
07-20-2001, 04:40 AM
Thanks, both ideas work!