Sum values for records with more than one similar field

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

Guest

In the detail part of a report I would like to show the sum the data for all
the records which have more than 2 fields in common. The report is based on
a query. My fields are Genus, Species, Location, Quantity. I would like my
report to give a single result with total quantity for all records that have
the same Genus, Species, and Location.

I have tried a few things to no avail. Probably a simple answer but its
driving me nuts. Any help would be much appreciated.
 
For the Record Source of the report you could use a query similar to the
following:

SELECT Genus, Species, Location, Sum([Quantity])
FROM MyTable
GROUP BY Genus, Species, Location

A query such as this will create one entry for each unique combination of
Genus, Species, Location, and give the total quantity for each combination.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


In the detail part of a report I would like to show the sum the data for all
the records which have more than 2 fields in common. The report is based on
a query. My fields are Genus, Species, Location, Quantity. I would like my
report to give a single result with total quantity for all records that have
the same Genus, Species, and Location.

I have tried a few things to no avail. Probably a simple answer but its
driving me nuts. Any help would be much appreciated.
 
Back
Top