Select Most Recent Date for Record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to my query to display the record that has the most recent date
(sorted in the query). Is it possible to just display one record? If yes,
please show me what to do.

Thanks!
 
Hi T M,
You'll need to write query with your date field in the leftmost sort field
and set its sort to "descending". Next set the "top values" to "1". Mouse
over the tool bar to find "top values" or you can set it using the "query
properties" box.

Ellen
 
T said:
I would like to my query to display the record that has the most
recent date (sorted in the query). Is it possible to just display one
record? If yes, please show me what to do.

Thanks!

SELECT TOP 1 .... ORDER BY YourDateField DESC

In the graphical query designer just open the property sheet and enter 1 for
the "Top Values" property and sort on your date field in descending order.
 
T said:
I would like to my query to display the record that has the most recent date
(sorted in the query). Is it possible to just display one record? If yes,
please show me what to do.


SELECT TOP 1 table.*
FROM table
ORDER BY table.datefield DESC
 

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

Back
Top