Sum records in column for presenting in report -------M-------

  • Thread starter Thread starter Mark909
  • Start date Start date
M

Mark909

If i have a column with a number of different records with the same name.

For Example,

Item

Pen
Pencil
Ruler
Ruler
Ruler
Pencil
Pen
Pencil
Ruler

How could I produce a report to show the counts of the records,

For Example I could create a report that shows:

Item Count

Pen 2
Pencil 3
Ruler 4


Thanks once again for help!! :)
 
Mark909 said:
If i have a column with a number of different records with the same name.

For Example,

Item

Pen
Pencil
Ruler
Ruler
Ruler
Pencil
Pen
Pencil
Ruler

How could I produce a report to show the counts of the records,

For Example I could create a report that shows:

Item Count

Pen 2
Pencil 3
Ruler 4


Thanks once again for help!! :)


A query similar to the following will do it for you ...

SELECT tblTest.item, Count(tblTest.item) AS CountOfitem
FROM tblTest
GROUP BY tblTest.item;
 
build a query with items in the first and second column... click the 'totals'
symbol in the center of your toolbar to add the Total row in the lower query
window, then change 'Group by' in the second column to 'Count'
 
Back
Top