SimplyDemented
Registered User.
- Local time
- Today, 11:50
- Joined
- Jun 7, 2007
- Messages
- 15
I am attempting to write some reports and am pretty much teaching myself access here at work. I am currently stuck on a counting issue.
I have a table where among other things it has a name and a number. Lets say for example:
Joe 2
Bob 3
Betty 4
Bob 5
John 1
As you can see, there are 2 Bobs in there. I have made a form where you have a drop down with all the names in the table, as well as a "*". If I choose an individual name and run it with this function in my report...
=DCount("[Rep_Name]","[tbl_listening]","[Rep_Name] = Forms![Listening_Retrieval_Form]![Combo18]")
...I get the total amount of times said person appears in the table. The problem occurs when I choose the *. I want it to display all the people along with their individual counts, but it ends up doing a total count. So in the example above, each name would just show 5 for the count.
I understand why it is happening, I just can't for the life of me figure out how to fix it. Unfortunately, my SQL is rusty and I never learned VB (plan to soon) so I really am working with very little. I know things like C, C++, Java, etc so I can follow things online, but writing it myself the syntax gets butchered.
Anyone know if there is just some tweaks I can make so that it will do what I want?
Thanks in advance for any help.
I have a table where among other things it has a name and a number. Lets say for example:
Joe 2
Bob 3
Betty 4
Bob 5
John 1
As you can see, there are 2 Bobs in there. I have made a form where you have a drop down with all the names in the table, as well as a "*". If I choose an individual name and run it with this function in my report...
=DCount("[Rep_Name]","[tbl_listening]","[Rep_Name] = Forms![Listening_Retrieval_Form]![Combo18]")
...I get the total amount of times said person appears in the table. The problem occurs when I choose the *. I want it to display all the people along with their individual counts, but it ends up doing a total count. So in the example above, each name would just show 5 for the count.
I understand why it is happening, I just can't for the life of me figure out how to fix it. Unfortunately, my SQL is rusty and I never learned VB (plan to soon) so I really am working with very little. I know things like C, C++, Java, etc so I can follow things online, but writing it myself the syntax gets butchered.
Anyone know if there is just some tweaks I can make so that it will do what I want?
Thanks in advance for any help.