Date field query

  • Thread starter Thread starter Peter Gundrum
  • Start date Start date
P

Peter Gundrum

I keep a database of my students test scores.

Does anybody know how I can query the 20 most recent
records for each student? If each student's date field
was sorted in descending order I would want the top 20
records by DATE.

Can somebody help me with this? Thanks.
 
Peter said:
I keep a database of my students test scores.

Does anybody know how I can query the 20 most recent
records for each student? If each student's date field
was sorted in descending order I would want the top 20
records by DATE.

Can somebody help me with this? Thanks.
Peter,
Make a Select Query.
Sort the query on the DateField, Descending.
Then click on the 'Top Values' tool button (it says 'All' as default).
Enter 20 into the tool button. Press Enter.
Run the query.

If you then read the query SQL, it will say
Select Top 20 .... etc.
 
Dear Peter:

You didn't give a lot of detail, so I can't give a detailed answer.

May I refer you to another post in this same newsgroup earlier today,
"Create TOP 3 Values per Group" in which I answered a very similar
question with specifics. You could either adapt this to your needs,
or post more detail so I can reply in detail.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top