Create a totals query with record identifying fields and your date field.
Change the Group By for the date field to Max. Join this query in you
present query that is the source for the subform on those record identifying
fields and date field to the MaxOfDate field.
Query4 --
SELECT [Change Requests].SomeField, Max([Change Requests].[Date open]) AS
[MaxOfDate open]
FROM [Change Requests]
GROUP BY [Change Requests].SomeField;
SELECT [Change Requests].*
FROM [Change Requests] INNER JOIN Query4 ON ([Change Requests].[Date open] =
Query4.[MaxOfDate open]) AND ([Change Requests].SomeField = Query4.SomeField);
--
KARL DEWEY
Build a little - Test a little
marf said:
I have a form with a subform (one-to-many relationship). The many side of the
relationship (subform) has a date associated with each record. When I run the
form I only want to see the entry with the newest date in the subform...
How do I do that??