Jason,
From my perspective, the easiest way to do this would be to use the
DateSerial function to create a date based on the YearField, MonthField, and
the first day of the month Notice that I have replaced your Month and Year
with MonthField and YearField; Month and Year are reserved words in Access
and should not be used as field names.
The subquery below identifies the maximum date for each ID and then uses
that to filter the other query.
SELECT ID, MonthField, YearField
FROM yourTable
WHERE DateSerial(YearField, MonthField, 1) = (SELECT
Max(DateSerial(YearField, MonthField, 1)) FROM yourTable T1 WHERE T1.ID =
yourTable.ID)
Another method would be:
SELECT ID, MonthField, YearField
FROM yourTable
INNER JOIN (SELECT ID, MAX(DateSerial(YearField,MonthField,1)) as MaxDate
FROM yourTable
GROUP BY ID) as T1
ON yourTable.ID = T1.ID
AND Dateserial(YearField, MonthField, 1) = T1.MaxDate
The second query would have to be written in the SQL view, and would not be
editable or viewable in the query design view because of the join on the
DateSerial functions value.
HTH
Dale