Query in report problems

  • Thread starter Thread starter Thomas Ranstorp
  • Start date Start date
T

Thomas Ranstorp

Hi,
I am new at this and have a problem. I have a report
where I would like to add information into the footer.
The information is the highets value in a specific field
in a specific query. I have tried to use the
expresiontool under properties to generate a query, but
this generates an error. The generated query was "=max
([nameOfTheQuery]![nameOfTheField])". But I have tried
lots of other ways (looking in the help did not help).

Please help!

Thanks,
/Thomas
 
Thomas Ranstorp said:
Hi,
I am new at this and have a problem. I have a report
where I would like to add information into the footer.
The information is the highets value in a specific field
in a specific query. I have tried to use the
expresiontool under properties to generate a query, but
this generates an error. The generated query was "=max
([nameOfTheQuery]![nameOfTheField])". But I have tried
lots of other ways (looking in the help did not help).

If you want the maximum value of a field in the query that the Report is
based on then you can use...
=Max([FieldName])
....in the Report Footer or Report Header.

If you want the maximum value of a field in a different query then you
use...
=DMax("FieldName", "QueryName")
....any place on the Report you like.

The DMax() function has an optional third argument if you need to add
criteria to find the maximum from a filtered set of rows. If you just want
the maximum from the entire query, then the above will do it.
 
Back
Top