Filter Data from Query

  • Thread starter Thread starter jimmy0305
  • Start date Start date
J

jimmy0305

I have two fields in a query that I need to filter by the each cod
with the most recent date
For ex
Code= MSM,RGS, I...etc & Treat_Dat

each code can have multiple dates but I only need the most recent dat
for each code
I tried filtering the code but I'm having a problem filtering the mos
recent date for each code

Can this be also performed in a simple query

Thanks

Jimm
 
Jimmy,

What you need is a totals query. Follow these steps:

* Start making a new query in design view
* Add the table
* Drag the two fields down to the query grid
* Do menu item View > Totals; notice the new row titled "Total:" that
appears in the grid; the default setting i Group By under both fields
* Change the Totals setting to Max under the date field

Congratulations! You're done.

HTH,
Nikos
 
Back
Top