Displaying Max Date on a Report

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

Guest

How do I display a max date on a report on a group header. The report is
based on a query that returns multiple dates for the the header value. I
would even like to display both the min and max date value on the report.
 
You can use this in the control source of the field
Max Date

=DMax("[DateFieldName]","[QueryName]")

And, Min date
=DMin("[DateFieldName]","[QueryName]")
 
Thanks, that worked. Can I add a grouping to match the report? Right now
it's returning the max date for the entire query.

Ofer Cohen said:
You can use this in the control source of the field
Max Date

=DMax("[DateFieldName]","[QueryName]")

And, Min date
=DMin("[DateFieldName]","[QueryName]")

--
Good Luck
BS"D


DV said:
How do I display a max date on a report on a group header. The report is
based on a query that returns multiple dates for the the header value. I
would even like to display both the min and max date value on the report.
 
Yes, you'll need to pass the group number as a criteria

If the Group field is text, then
=DMax("[DateFieldName]","[QueryName]","[GroupNumberInQuery] = '" &
[GroupNumber] & "'")

If the Group field is number, then
=DMax("[DateFieldName]","[QueryName]","[GroupNumberInQuery] = " &
[GroupNumber])


--
Good Luck
BS"D


DV said:
Thanks, that worked. Can I add a grouping to match the report? Right now
it's returning the max date for the entire query.

Ofer Cohen said:
You can use this in the control source of the field
Max Date

=DMax("[DateFieldName]","[QueryName]")

And, Min date
=DMin("[DateFieldName]","[QueryName]")

--
Good Luck
BS"D


DV said:
How do I display a max date on a report on a group header. The report is
based on a query that returns multiple dates for the the header value. I
would even like to display both the min and max date value on the report.
 
Back
Top