Counting

  • Thread starter Thread starter Frolickin
  • Start date Start date
F

Frolickin

I have a table set up like this:
AUTO ID, NAME, NAME 2, etc.

The text in the NAME field can be repeated. I want to
count how many of each NAME there is and display them such
as:

Smith 23
Jones 12
Burns 10
etc.

How do I do this?
 
I have a table set up like this:
AUTO ID, NAME, NAME 2, etc.

The text in the NAME field can be repeated. I want to
count how many of each NAME there is and display them such
as:

Smith 23
Jones 12
Burns 10
etc.

How do I do this?

in the query by design window, select Name and and chose Group By in the
totals drop-down box. then create a second column for Name and chose
Count in the totals drop-down box.

i think that should work
 
How many NAME fields do you have? Do you need to count by occurances in
either field or just the one?
How would you count
NAME NAME2
Jones Smith
Johnson Jones
 
How many NAME fields do you have? Do you need to count by
occurances in either field or just the one?
How would you count
NAME NAME2
Jones Smith
Johnson Jones

I only need to be concerned with the first NAME field.
Everything else can be ignored for this.
 
in the query by design window, select Name and and chose
Group By in the
totals drop-down box. then create a second column for Name and chose
Count in the totals drop-down box.

i think that should work

Unless I am missing something, that results in something
like this:

Jones 1
Smith 1
Jones 1
Mitchell 1
Smith 1
Smith 1

whereas I am looking for totals for each:
Jones 2
Smith 3
Mitchell 1
 
Unless I am missing something, that results in something
like this:

Jones 1
Smith 1
Jones 1
Mitchell 1
Smith 1
Smith 1

whereas I am looking for totals for each:
Jones 2
Smith 3
Mitchell 1

no it shouldn't do. that's why you chose the first NAME column to be
labelled GROUP BY (so that it groups all the same names together. then in
the second NAME column you chose COUNT so that it counts the number of
names per GROUP BY.
 
no it shouldn't do. that's why you chose the first NAME
column to be
labelled GROUP BY (so that it groups all the same names together. then in
the second NAME column you chose COUNT so that it counts the number of
names per GROUP BY.

My apologies. Once I got rid of another field that was
just sitting there taking up space, this worked like a
charm!

Thank you!
 
no it shouldn't do. that's why you chose the first NAME column to be
labelled GROUP BY (so that it groups all the same names together. then
in the second NAME column you chose COUNT so that it counts the number
of names per GROUP BY.

sorry, that post is by me.

IE:

NAME NAMR
GROUP BY COUNT

Philips 4
Smith 2
 
My apologies. Once I got rid of another field that was
just sitting there taking up space, this worked like a
charm!

Thank you!

glad it worked.

now i just hope for someone to help me with my query problem :)
 
I see you got this working. You should consider avoiding NAME as a field
NAME since NAME is a property of every object in your Access database.
 
I see you got this working. You should consider avoiding
NAME as a field
NAME since NAME is a property of every object in your
Access database.

Thank you for your help. The field isn't actually called
NAME. I thought for the example it would be the easiest
way of describing the field, but your point is well taken.

Thanks!
 
It's a bit of a pet-peeve of mine when posters substitute names like NAME or
DATE or other reserved words to make it "easier" for us to understand. In
the future, could you please use the actual field names or substitute an
alternative that isn't reserved?
 
Back
Top