Pick the newest date

G

Guest

I have a table of financial statements, one of the fields is a financial
statement date. There is a report that shows the data from each year
(record). I want to create a report that picks the record of the most
current year.

Any ideas on how to accomplish this would be appreciated.

Thank you,
Kelvin
 
G

Guest

Using a sub query

Select T1.* From [financial statements] As T1 Where
T1.[financial statement date] In (Select Top 1 T2.[financial statement date]
From [financial statements] As T2 Where T2![financial Id] = T1![financial Id]
Order By T2.[financial statement date] Desc)

Note:
change the "financial Id" field to the field name that distinguish each
group of dates

The Top 1 specify that I want only the highst date to return, later if
you'll want the last 2 recent dates then change it to
TOP 2
 

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