picking first or last row

  • Thread starter Thread starter Eric Nelson
  • Start date Start date
E

Eric Nelson

A table, say journal entries, has rows which have dates in
them. A join operation with another table results in
several rows. Of those I'd like to pick the latest one, or
maybe the earliest one. But in either case I'd like the
whole row, not just the date of the row.

That make sense? Thanks.

Eric
 
Yes I think so. You want to use the Max or Min function and still see the
other values in the row. This is a little tricky, but there are two
solutions. On my website, see sig below, is a small sample database called
"MaxQueryProblem" which illustrates both of them.
 
Eric
I think this is similar to something I got help on recently. I wanted the first or last record of a group of records in a query. The solution was to include all desired fields in the query, add a Total row in the query design screen (by clicking on the Totals toolbar icon), assign Group By as the Total criteria for the field to group your records on, then assign either First or Last as the Total criteria for all other fields. Hope this heads you in the right direction at least
ctda


----- Eric Nelson wrote: ----

A table, say journal entries, has rows which have dates in
them. A join operation with another table results in
several rows. Of those I'd like to pick the latest one, or
maybe the earliest one. But in either case I'd like the
whole row, not just the date of the row

That make sense? Thanks

Eri
 
Back
Top