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
 
Back
Top