Query for most recent 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
 
D

Duane Hookom

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top