Sort by two, then sum?

  • Thread starter Andrew Knapp via AccessMonster.com
  • Start date
A

Andrew Knapp via AccessMonster.com

Well, I have a rather complicated problem(Or at least it's complicated to
me).
I want to create a query that pulls results from between two numbers in one
table by using in the Criteria "Between[Input low number]and[Input high
number]"(#1). For the records that match those criteria, I want to create
a sum of how many items have the same name in a table.

I can do it without he #1 criteria by taking a one to many relationship,
inputing the One in the Sort as a Group by and the Many as a Count.

However with the #1 criteria criteria in place, it creates a count for each
number in the range.

Example: For "Between 9 and 12", It would display the count for 9, the
count for 10, the count for 11 and the count for 12. I want them to be all
together, and I'm at a loss as to what to do.

Maybe I'm heading in the complete wrong direction with this, or not. But
if someone could give me a second poin of view, that would be stellar.
 
J

John Vinson

Example: For "Between 9 and 12", It would display the count for 9, the
count for 10, the count for 11 and the count for 12. I want them to be all
together, and I'm at a loss as to what to do.

Change the default Totals row value "Group By" under the number field
to "Where". This will use the field just for criteria, and not group
by it.

John W. Vinson[MVP]
 
Top