totn Access

MS Access 2007: Query to retrieve max date

This MSAccess tutorial explains how to create a query to retrieve the max date in Access 2007 (with screenshots and step-by-step instructions).

Question: In Microsoft Access 2007, how can I build a query to select the latest date among several records?

Answer: To do this, open your query in Design view. Select the field that contains the date values. In this example, we've selected the OrderDate field.

Select the Design tab in the toolbar at the top of the screen. Then click on the Totals button in the Show/Hide group.

Microsoft Access

A Total line should now appear in the Design view. By default, Group By will be selected. Instead, select Max from the list.

Microsoft Access

Your query should now look like the following picture:

Microsoft Access