Most Recent Record in a set

  • Thread starter Thread starter Chegu Tom
  • Start date Start date
C

Chegu Tom

Hi

I have a table that contains MemberCode, StatusDate, and status information
Rank, Title Note on that member

Any member may have many status records.

I want a form that shows the most recent status record for each record (Max
of StatusDate). The problem I have is making a query to list the most
recent record for each member without using a bunch of dlookup() functions
 
hi Tom,

Chegu said:
I have a table that contains MemberCode, StatusDate, and status information
Rank, Title Note on that member
I want a form that shows the most recent status record for each record (Max
of StatusDate). The problem I have is making a query to list the most
recent record for each member without using a bunch of dlookup() functions
E.g.:

SELECT *
FROM yourTable o
WHERE o.StatusDate =
(
SELECT Max(i.StatusDate)
FROM yourTable i
WHERE i.MemberCode = o.MemberCode
)



mfG
--> stefan <--
 
Back
Top