Display maximum date in report header (Access 2000)

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

Guest

I have a budget report that summarizes budget items and dollar amounts. In
the underlying query, there is a "dtDateAdded" date field containing the date
that each item was added to the budget. I want to use the greatest date
value as the report date in the page header of the report, but I keep getting
an error when I change the control source to =Max([dtDateAdded]).

Am I doing something wrong?
 
Dewey,

Try using a DMax function. DMax("[dtDateAdded]","reportqueryname")
And ensure the control name of you textbox is not the same as any fields in
your record source and is not a reserved word such as "date".
The dmax function is not as efficient as other functions but as it is only
running once in the header you should be right.

HTH

Terry
 
Thanks Terry - worked like a charm.

--
J. Mullenbach


TerryC said:
Dewey,

Try using a DMax function. DMax("[dtDateAdded]","reportqueryname")
And ensure the control name of you textbox is not the same as any fields in
your record source and is not a reserved word such as "date".
The dmax function is not as efficient as other functions but as it is only
running once in the header you should be right.

HTH

Terry


Dewey said:
I have a budget report that summarizes budget items and dollar amounts. In
the underlying query, there is a "dtDateAdded" date field containing the date
that each item was added to the budget. I want to use the greatest date
value as the report date in the page header of the report, but I keep getting
an error when I change the control source to =Max([dtDateAdded]).

Am I doing something wrong?
 
Back
Top