Latest date

IanT

Registered User.
Local time
Today, 19:35
Joined
Nov 30, 2001
Messages
191
I have two dates linked to a record. I want a query to select the newest date.
ie............06-06-02
10-06-02

Result of query 10-06-02


Can anyone help!
 
Create a query and use Max([YourDateField]) to find the latest date. Another option is to create a query with YourDateField in descending order and use Top Values to select the Top 1 value.
 
If you're viewing more than one record at once

Then you should use a Totals Query.

Group By the CustomerID (or whatever identifies those two records as being in the same record set). Then select Max for the Date field, and you'll get the Max date for each Customer.

Be careful with Totals queries; extra fields can screw up your results, because they will each try to Group the results differently.

If you need to see more data that might be different in each of the records, link back to those fields in another query after you get the Max stuff sorted out.
 

Users who are viewing this thread

Back
Top Bottom