Min & Max Values in a Query

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

Guest

Using Access 2003 I have a query which extracts furnace temperatures within a
given date range.

The query feeds a report.

How can I show the minimum and maximum temperatures on the report?
 
I think the easiest way would be to have a second query that only returns
the min and max, and use that for a subreport:
 
Glynn Taylor said:
Using Access 2003 I have a query which extracts furnace temperatures
within a
given date range.

The query feeds a report.

How can I show the minimum and maximum temperatures on the report?

Use the DMin and DMax functions. Let's say your temperature is in a field
called Temp which is in a table called Furnace Temps. You create an unbound
control for the minimum with the following as Record Source:

=DMin("[Temp]", "Furnace Temps")

and another for the maximum:

=DMax("[Temp]", "Furnace Temps")

Tom Lake
 
Douglas J. Steele said:
I think the easiest way would be to have a second query that only returns
the min and max, and use that for a subreport:

So the DMin and DMax idea was not good? You know more about these things
than I do.

Tom Lake
 
Using Access 2003 I have a query which extracts furnace temperatures within a
given date range.

The query feeds a report.

How can I show the minimum and maximum temperatures on the report?

Use the DMin and DMax functions. Let's say your temperature is in a field called
Temp which is in a table called Furnace Temps. You create an unbound control for
the minimum with the following as Record Source:

=DMin("[Temp]", "Furnace Temps")

and another for the maximum:

=DMax("[Temp]", "Furnace Temps")

For the date range you'd use the name of the query rather than the name of the table!
I missed that point the first time.

Tom L
 
Thank you all - I've userd the Min & Max statemenst on unbound fields in the
report footer

Tom Lake said:
Glynn Taylor said:
Using Access 2003 I have a query which extracts furnace temperatures
within a
given date range.

The query feeds a report.

How can I show the minimum and maximum temperatures on the report?

Use the DMin and DMax functions. Let's say your temperature is in a field
called Temp which is in a table called Furnace Temps. You create an unbound
control for the minimum with the following as Record Source:

=DMin("[Temp]", "Furnace Temps")

and another for the maximum:

=DMax("[Temp]", "Furnace Temps")

Tom Lake
 
Back
Top