Query for most recent date

  • Thread starter Thread starter RC
  • Start date Start date
R

RC

I want to add a new field to an existing query and call it
Last Date. What I need this field to do is inspect all the
dates in the existing date column, find the most recent
date, and indicate this by putting a "Y" in the new field
for that particular record. Running the query should
produce this:

ID# Date Last Date
1 01/01/2003
2 01/02/2003
3 01/03/2003 Y

How do I write this?

TIA,
RC
 
Try:
SELECT *,
IIf(DMax("[Date]","tblNoName") = [Date], "Y","") As LastDate
FROM tblNoName;
 
Back
Top