Displaying Max Date on a Report

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.
 
G

Guest

You can use this in the control source of the field
Max Date

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

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

Guest

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top