Solved

Count Answers in Access 2007

Posted on 2013-01-03
4
445 Views
Last Modified: 2013-01-09
Hi All,

I have a 2007 MS Access Data base.  My table looks something like this:

Names      Over 18?
Name 1      Yes
Name 2      Yes
Name 3      No
Name 4      No
Name 5      Yes
Name 6      Don’t know
Name 7      Unknown
Name 8      Not Sure

Is there a way to run a report that will list the answers and show the total count such as:

Over 18                  Count
Yes             3
No              2
Don’t know       1
Unknown              1
No                               1

I don’t want to use the drop down and require a specific answers, just in case there is a need to enter something other than what obvious.   The table above is just an example so please work with me.   This will also help with misspelled words and later I could create a drop down list such as Yes, No, Not stated.  The data base is new and we are still working on how the data is to be entered.  My data base structure will change once we work out the bugs.

Thanks in advance.
0
Comment
Question by:Reyesrj
4 Comments
 
LVL 29

Assisted Solution

by:IrogSinta
IrogSinta earned 167 total points
ID: 38742926
Create a query with this SQL statement and create a report from it.
SELECT Over18, Count(Names) AS HowMany
FROM TableName
GROUP BY Over18
ORDER BY Over18 DESC
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 167 total points
ID: 38742927
so if want query to get this reult will be


Select [over 18] , count(*) from tablename
group by [over 18]
0
 
LVL 61

Assisted Solution

by:mbizup
mbizup earned 166 total points
ID: 38743267
Ron's query (first comment) should work to list just the "over 18" answers with their respective counts.

An alternative if you want to see the names listed as well is to simply set the report's recordsource property to point to your table (no query).

Use the report's sorting/grouping properties to group on [Over 18?].  

Add controls for the names or any other information you want to see in the report's Detail Section.

Then place a textbox in the Group Footer (or Group Header), and set it's Control Source property to (include the = sign):

= Count([Names])

This approach will group your names, etc by the responses given, and show a total count per response type, like this:

Names      Over 18?
Name 1      Yes
Name 2      Yes
Name 5      Yes
        Total:  3

Name 3      No
Name 4      No
        Total:  2

Name 6      Don’t know
        Total:  1

Name 7      Unknown
        Total:  1

Name 8      Not Sure
        Total:  1
0
 

Author Closing Comment

by:Reyesrj
ID: 38761704
Thanks All,  I find it easier to qurey the database into excel and run a pivot talble.  Too many steps but I can't seem to find an easier way.

Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now