Date field query

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.
 
F

fredg

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.
 
T

Tom Ellison

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top