Returning only maximum values by sorted data

  • Thread starter Thread starter CAT
  • Start date Start date
C

CAT

I'm am trying to use a query to 1. sort records by id
number, and 2. display only the maximum values of each
sorted record. I have a field on a form that returns this
value, but I can't seem to use this field in an expression
on the query to display the correct information. Please
advise. thanks, CAT
 
CAT,

Do you mean that in the table concerned, you have multiple records
with the same id number? If I understand you correctly, you can use a
Totals Query for this. Make a query based on your table, put the ID
field and the Value field into the query design grid, select Totals
from the View menu, in the totals row of the ID field put Group By
(and also put a sort order), and in the Totals row of the Value field
put Max.

- Steve Schapel, Microsoft Access MVP
 
I tried what you suggested, but I'm still getting all
records. Any other ideas? Thanks, CAT
 
CAT,

If you tried what I suggested, it is impossible for you to get all
records! Please post back with the SQL view of the query you are
trying... I have obviously not understood the problem correctly.

- Steve Schapel, Microsoft Access MVP
 
Back
Top