How to get a count of a specific item

A

AccessDB

Let's say that I have this column with 13 items and 6 of the items is
Teddy Bears, 4 is Flowers, and 3 is cards. How do I write a count
statment in Mircosoft Access for a report (textbox).Example: I know
that you can wirte --------- =Count([Column_Name])
But that only give you the grand total count of 13. I want to know how
to write a statement to find out that Teddy Bear's count is 6. Can
anybody help?
 
A

AccessDB

I did and I got a syntax error saying stating "Extra ) in query
expression 'First([ = Abs(Sum([Column_Name]="Teddy Bears"))])'. The
actual statement is exactly like how I typed it except for of course:
Column_Name and "Teddy Bears".

Can you see if you can help me out with the problem here.
Duane said:
Try:
=Abs(Sum([Column_Name]="Teddy Bears"))
--
Duane Hookom
MS Access MVP

AccessDB said:
Let's say that I have this column with 13 items and 6 of the items is
Teddy Bears, 4 is Flowers, and 3 is cards. How do I write a count
statment in Mircosoft Access for a report (textbox).Example: I know
that you can wirte --------- =Count([Column_Name])
But that only give you the grand total count of 13. I want to know how
to write a statement to find out that Teddy Bear's count is 6. Can
anybody help?
 
D

Duane Hookom

Where did you type the expression I provided? Where did the "First..." come
from?

The expression:
=Abs(Sum([Column_Name]="Teddy Bears"))
contains balanced ()s.

--
Duane Hookom
MS Access MVP

AccessDB said:
I did and I got a syntax error saying stating "Extra ) in query
expression 'First([ = Abs(Sum([Column_Name]="Teddy Bears"))])'. The
actual statement is exactly like how I typed it except for of course:
Column_Name and "Teddy Bears".

Can you see if you can help me out with the problem here.
Duane said:
Try:
=Abs(Sum([Column_Name]="Teddy Bears"))
--
Duane Hookom
MS Access MVP

AccessDB said:
Let's say that I have this column with 13 items and 6 of the items is
Teddy Bears, 4 is Flowers, and 3 is cards. How do I write a count
statment in Mircosoft Access for a report (textbox).Example: I know
that you can wirte --------- =Count([Column_Name])
But that only give you the grand total count of 13. I want to know how
to write a statement to find out that Teddy Bear's count is 6. Can
anybody help?
 
A

AccessDB

I am using the syntax you gave me in a textbox on a report (in design
view).
The "First" automatically came up in Access. I didn't not type it.
How can I send you an attached document?


Duane said:
Where did you type the expression I provided? Where did the "First..." come
from?

The expression:
=Abs(Sum([Column_Name]="Teddy Bears"))
contains balanced ()s.

--
Duane Hookom
MS Access MVP

AccessDB said:
I did and I got a syntax error saying stating "Extra ) in query
expression 'First([ = Abs(Sum([Column_Name]="Teddy Bears"))])'. The
actual statement is exactly like how I typed it except for of course:
Column_Name and "Teddy Bears".

Can you see if you can help me out with the problem here.
Duane said:
Try:
=Abs(Sum([Column_Name]="Teddy Bears"))
--
Duane Hookom
MS Access MVP

Let's say that I have this column with 13 items and 6 of the items is
Teddy Bears, 4 is Flowers, and 3 is cards. How do I write a count
statment in Mircosoft Access for a report (textbox).Example: I know
that you can wirte --------- =Count([Column_Name])
But that only give you the grand total count of 13. I want to know how
to write a statement to find out that Teddy Bear's count is 6. Can
anybody help?
 
D

Duane Hookom

You can't send me an attachment.
Your text box is located in which section of your report?
What is the exact Control Source property of your text box?

--
Duane Hookom
MS Access MVP

AccessDB said:
I am using the syntax you gave me in a textbox on a report (in design
view).
The "First" automatically came up in Access. I didn't not type it.
How can I send you an attached document?


Duane said:
Where did you type the expression I provided? Where did the "First..."
come
from?

The expression:
=Abs(Sum([Column_Name]="Teddy Bears"))
contains balanced ()s.

--
Duane Hookom
MS Access MVP

AccessDB said:
I did and I got a syntax error saying stating "Extra ) in query
expression 'First([ = Abs(Sum([Column_Name]="Teddy Bears"))])'. The
actual statement is exactly like how I typed it except for of course:
Column_Name and "Teddy Bears".

Can you see if you can help me out with the problem here.
Duane Hookom wrote:
Try:
=Abs(Sum([Column_Name]="Teddy Bears"))
--
Duane Hookom
MS Access MVP

Let's say that I have this column with 13 items and 6 of the items
is
Teddy Bears, 4 is Flowers, and 3 is cards. How do I write a count
statment in Mircosoft Access for a report (textbox).Example: I know
that you can wirte --------- =Count([Column_Name])
But that only give you the grand total count of 13. I want to know
how
to write a statement to find out that Teddy Bear's count is 6. Can
anybody help?
 
A

AccessDB

The syntax that I put in the Control Source property is
=Abs(Sum([Engine Manufacturer]="Briggs"))
So I want to know the count of of the "Briggs" engines on whatever
query I do on my rptBuilder Form.


Duane said:
You can't send me an attachment.
Your text box is located in which section of your report?
What is the exact Control Source property of your text box?

--
Duane Hookom
MS Access MVP

AccessDB said:
I am using the syntax you gave me in a textbox on a report (in design
view).
The "First" automatically came up in Access. I didn't not type it.
How can I send you an attached document?


Duane said:
Where did you type the expression I provided? Where did the "First..."
come
from?

The expression:
=Abs(Sum([Column_Name]="Teddy Bears"))
contains balanced ()s.

--
Duane Hookom
MS Access MVP

I did and I got a syntax error saying stating "Extra ) in query
expression 'First([ = Abs(Sum([Column_Name]="Teddy Bears"))])'. The
actual statement is exactly like how I typed it except for of course:
Column_Name and "Teddy Bears".

Can you see if you can help me out with the problem here.
Duane Hookom wrote:
Try:
=Abs(Sum([Column_Name]="Teddy Bears"))
--
Duane Hookom
MS Access MVP

Let's say that I have this column with 13 items and 6 of the items
is
Teddy Bears, 4 is Flowers, and 3 is cards. How do I write a count
statment in Mircosoft Access for a report (textbox).Example: I know
that you can wirte --------- =Count([Column_Name])
But that only give you the grand total count of 13. I want to know
how
to write a statement to find out that Teddy Bear's count is 6. Can
anybody help?
 
A

AccessDB

I forgot to tell you that my textbox is on the footer of the report. I
also have other textboxes there that gives me the min, max, avg, and
sum of other columns.
AccessDB said:
The syntax that I put in the Control Source property is
=Abs(Sum([Engine Manufacturer]="Briggs"))
So I want to know the count of of the "Briggs" engines on whatever
query I do on my rptBuilder Form.


Duane said:
You can't send me an attachment.
Your text box is located in which section of your report?
What is the exact Control Source property of your text box?

--
Duane Hookom
MS Access MVP

AccessDB said:
I am using the syntax you gave me in a textbox on a report (in design
view).
The "First" automatically came up in Access. I didn't not type it.
How can I send you an attached document?


Duane Hookom wrote:
Where did you type the expression I provided? Where did the "First..."
come
from?

The expression:
=Abs(Sum([Column_Name]="Teddy Bears"))
contains balanced ()s.

--
Duane Hookom
MS Access MVP

I did and I got a syntax error saying stating "Extra ) in query
expression 'First([ = Abs(Sum([Column_Name]="Teddy Bears"))])'. The
actual statement is exactly like how I typed it except for of course:
Column_Name and "Teddy Bears".

Can you see if you can help me out with the problem here.
Duane Hookom wrote:
Try:
=Abs(Sum([Column_Name]="Teddy Bears"))
--
Duane Hookom
MS Access MVP

Let's say that I have this column with 13 items and 6 of the items
is
Teddy Bears, 4 is Flowers, and 3 is cards. How do I write a count
statment in Mircosoft Access for a report (textbox).Example: I know
that you can wirte --------- =Count([Column_Name])
But that only give you the grand total count of 13. I want to know
how
to write a statement to find out that Teddy Bear's count is 6. Can
anybody help?
 
D

Duane Hookom

Your statement "So I want to know the count of of the 'Briggs' engines on
whatever query I do on my rptBuilder Form" has me stumped. Is this
extraneous information or somehow relevant?

Try create a new blank report with the same record source as your current
report. Display the Report Footer section and add a text box with a control
source of:
=Abs(Sum([Engine Manufacturer]="Briggs"))
Does this work?

--
Duane Hookom
MS Access MVP


AccessDB said:
I forgot to tell you that my textbox is on the footer of the report. I
also have other textboxes there that gives me the min, max, avg, and
sum of other columns.
AccessDB said:
The syntax that I put in the Control Source property is
=Abs(Sum([Engine Manufacturer]="Briggs"))
So I want to know the count of of the "Briggs" engines on whatever
query I do on my rptBuilder Form.


Duane said:
You can't send me an attachment.
Your text box is located in which section of your report?
What is the exact Control Source property of your text box?

--
Duane Hookom
MS Access MVP

I am using the syntax you gave me in a textbox on a report (in design
view).
The "First" automatically came up in Access. I didn't not type it.
How can I send you an attached document?


Duane Hookom wrote:
Where did you type the expression I provided? Where did the
"First..."
come
from?

The expression:
=Abs(Sum([Column_Name]="Teddy Bears"))
contains balanced ()s.

--
Duane Hookom
MS Access MVP

I did and I got a syntax error saying stating "Extra ) in query
expression 'First([ = Abs(Sum([Column_Name]="Teddy Bears"))])'.
The
actual statement is exactly like how I typed it except for of
course:
Column_Name and "Teddy Bears".

Can you see if you can help me out with the problem here.
Duane Hookom wrote:
Try:
=Abs(Sum([Column_Name]="Teddy Bears"))
--
Duane Hookom
MS Access MVP

Let's say that I have this column with 13 items and 6 of the
items
is
Teddy Bears, 4 is Flowers, and 3 is cards. How do I write a
count
statment in Mircosoft Access for a report (textbox).Example: I
know
that you can wirte --------- =Count([Column_Name])
But that only give you the grand total count of 13. I want to
know
how
to write a statement to find out that Teddy Bear's count is 6.
Can
anybody help?
 

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