sum count of

A

alex

Hello experts,

I have a query that counts a particular text field using 'Count' and
'Group By'.

I then have a report based on this query. Everything works fine;
however, I want to sum the counts in my report.

E.g.,

Shape CountOfShapes

square 2
circle 5
triangle 3

TotalCountOfShape = 10

I have an unbound textbox and I've tried =sum([CountOfShapes]) but I
get a #Error message.

Thoughts?

alex
 
A

Al Campagna

Alex,
What is the name of the calculated control?
=sum([CountOfShapes])

Make sure the name is not "CountOfShapes." If the name of
the control uses any of the elements in the calculation, an #error
occurs. Try naming it TotalShapes as an example.

Also, the CountOfShapes values can not be the result of an unbound
calculation on the form.
--
hth
Al Campagna
Access MVP 2007
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love, and you'll never work a day in your life."
 
Z

zionsaal

Alex,
What is the name of the calculated control?
=sum([CountOfShapes])

Make sure the name is not "CountOfShapes." If the name of
the control uses any of the elements in the calculation, an #error
occurs. Try naming it TotalShapes as an example.

Also, the CountOfShapes values can not be the result of an unbound
calculation on the form.
--
hth
Al Campagna
Access MVP 2007
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love, and you'll never work a day in your life."




Hello experts,
I have a query that counts a particular text field using 'Count' and
'Group By'.
I then have a report based on this query. Everything works fine;
however, I want to sum the counts in my report.

Shape CountOfShapes
square 2
circle 5
triangle 3
TotalCountOfShape = 10
I have an unbound textbox and I've tried =sum([CountOfShapes]) but I
get a #Error message.
Thoughts?

alex- Hide quoted text -

- Show quoted text -

may be the countofshaps is a text not a number datatype?
 
A

alex

Alex,
What is the name of the calculated control?
=sum([CountOfShapes])

Make sure the name is not "CountOfShapes." If the name of
the control uses any of the elements in the calculation, an #error
occurs. Try naming it TotalShapes as an example.

Also, the CountOfShapes values can not be the result of an unbound
calculation on the form.
--
hth
Al Campagna
Access MVP 2007
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love, and you'll never work a day in your life."




Hello experts,
I have a query that counts a particular text field using 'Count' and
'Group By'.
I then have a report based on this query. Everything works fine;
however, I want to sum the counts in my report.
I have an unbound textbox and I've tried =sum([CountOfShapes]) but I
get a #Error message.
Thoughts?

alex- Hide quoted text -

- Show quoted text -

Thanks Al for the response. I found part of my problem.

When I place my 'sum' text box in Page Footer section, I get the
aforementioned #Error.
However, when I place my 'sum' text box in the Detail secion, it
works...sort of.
I now get the sum (10), but after every count:

E.g.,

Shape CountOfShapes

square 2 TotalCountOfShape = 10
circle 5 TotalCountOfShape = 10
triangle 3 TotalCountOfShape = 10

I only want (TotalCountOfShape = 10) at the bottom of my report.

alex
 
Z

zionsaal

Alex,
What is the name of the calculated control?
=sum([CountOfShapes])
Make sure the name is not "CountOfShapes." If the name of
the control uses any of the elements in the calculation, an #error
occurs. Try naming it TotalShapes as an example.
Also, the CountOfShapes values can not be the result of an unbound
calculation on the form.
--
hth
Al Campagna
Access MVP 2007
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love, and you'll never work a day in your life."
Hello experts,
I have a query that counts a particular text field using 'Count' and
'Group By'.
I then have a report based on this query. Everything works fine;
however, I want to sum the counts in my report.
E.g.,
I have an unbound textbox and I've tried =sum([CountOfShapes]) but I
get a #Error message.
Thoughts?
alex- Hide quoted text -
- Show quoted text -

Thanks Al for the response. I found part of my problem.

When I place my 'sum' text box in Page Footer section, I get the
aforementioned #Error.
However, when I place my 'sum' text box in the Detail secion, it
works...sort of.
I now get the sum (10), but after every count:

E.g.,

Shape CountOfShapes

square 2 TotalCountOfShape = 10
circle 5 TotalCountOfShape = 10
triangle 3 TotalCountOfShape = 10

I only want (TotalCountOfShape = 10) at the bottom of my report.

alex- Hide quoted text -

- Show quoted text -

place it in the report footer section
 
A

alex

Alex,
What is the name of the calculated control?
=sum([CountOfShapes])
Make sure the name is not "CountOfShapes." If the name of
the control uses any of the elements in the calculation, an #error
occurs. Try naming it TotalShapes as an example.
Also, the CountOfShapes values can not be the result of an unbound
calculation on the form.
--
hth
Al Campagna
Access MVP 2007
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love, and you'll never work a day in your life."
Hello experts,
I have a query that counts a particular text field using 'Count' and
'Group By'.
I then have a report based on this query. Everything works fine;
however, I want to sum the counts in my report.
E.g.,
I have an unbound textbox and I've tried =sum([CountOfShapes]) but I
get a #Error message.
Thoughts?
alex- Hide quoted text -
- Show quoted text -

Thanks Al for the response. I found part of my problem.

When I place my 'sum' text box in Page Footer section, I get the
aforementioned #Error.
However, when I place my 'sum' text box in the Detail secion, it
works...sort of.
I now get the sum (10), but after every count:

E.g.,

Shape CountOfShapes

square 2 TotalCountOfShape = 10
circle 5 TotalCountOfShape = 10
triangle 3 TotalCountOfShape = 10

I only want (TotalCountOfShape = 10) at the bottom of my report.

alex- Hide quoted text -

- Show quoted text -

I GOT IT...thanks to all who thought about it.
I needed to place the text box in the Report Footer, not the Detail or
Page Footer section!

alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top