Dale,
Your method should work except the poster wants ONLY ONE record returned per
Person per Date and the poster said that there may be more than one record
per person per date.
Since the poster did not say what criteria she/he wanted to use to make the
decision on which record to show in case of TIES and whether or not the
result needed to be editable, the following is one solution.
SELECT PersonID as Person
, Edate as MostRecentEdate
, First(Amount) as TheAmount
, First(TransType) as TransactionType
FROM yourTable
WHERE Edate = (SELECT Max(Edate)
From yourTable T
WHERE T.PersonID = yourTable.PersonID)
GROUP BY PersonID, EDate
Or the following more complicated method
SELECT YourTable.PersonID
, Edate as MostRecentEdate
, First(Amount) as TheAmount
, First(TransType) as TransactionType
FROM yourTable
INNER JOIN (SELECT PersonID, Max(Edate) as MaxDate
FROM yourTable
GROUP BY PersonID, Edate) as PersonMaxDate
ON yourTable.PersonID = PersonMaxDate.PersonID
AND yourTable.Edate = PersonMaxDate.MaxDate
GROUP BY YourTable.PersonID, YourTable.EDate
If the poster need the query results to be editable then the use of the TOP
predicate may be a solution.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County