summing records form recordset

  • Thread starter Thread starter Jean-Paul De WInter
  • Start date Start date
J

Jean-Paul De WInter

Hi,
A query returns a recordset as follow:

A B C D E D
LO 5 6 8 8 8
LO 5 8 6 5 5
X1 8 7 9 9 5
X2 7 7 7 7 7

What I would like is finding a way to sum all records with the same "A"
value. These results should be devide by the times this recordset has the
same "A" value. (the average)

So in my example it finally should be:

A B C D E D
LO 5 7 7 6,5 6,5
X1 8 7 9 9 5
X2 7 7 7 7 7

How can this be done??
 
Hi,

In your query go to design view and check the Totals option in the View Menu
(or click the Totals button on the toolbar)

This will give you a Total row in the query design grid.

In this new row leave A as Group By and set all others to Avg.

Now the results should match your example below.

--
HTH

Mark Phillipson

Free Add-Ins at; http://mphillipson.users.btopenworld.com/
 
Back
Top