Queries and reports in access Need help please

G

GabrielG

Hello everyone ,
I have a little issue to setup a database. I created a table with
approximately 20 columns. The columns have an entry of Yes or no base on a
questionnaire from survey. What can I do to get a result of my table I would
like to know how many "Yes" and "no" I have. I don't know how to add them or
get this information.

Thanks in advance
GABRIEL
 
S

Steve Schapel

Gabriel,

The first answer to your question is that your table structure is not
really the best for this situation, and it will be a lot easier if you
can set it up differently. Is your database design set in concrete, or
are you able to consider a revision?

By the way, posting to one, or at most 2 newsgroups is usually
sufficient to get a good help.
 
G

GabrielG

I can consider a revision . What do you recommend?
I need to find the best solution due to the fact that most likely I will be
doing some more of these projects. Like I said before the only data will be
Yes or no answers based on question. The goal will be how many yes and no
answers we can gather and have a nice report. any suggestions?
 
S

Steve Schapel

Gabriel,

Your survey responses should be in a table with fields similar to...

RespondentID
QuestionNumber
YesNoAnswer

In other words, the answer to each question should be a separate record
in the table, rather than a separate field. So, to simplify, let's say
you have 2 people respond to the survey, and let's suppose the survey
only has 3 questions for the sake of illustration, then the data in the
table might look like this:

1 1 Yes
1 2 No
1 3 No
2 1 Yes
2 2 Yes
2 3 No

Get the idea? I know your database is probably more complex than this,
with information about the respondents in another table, and the
questions themselves listed in yet another table. But this way of
recording the responses will allow you to easilt create a query that
will show results such as...

Question Response Count
1 Yes 2
1 No 0
2 Yes 1
2 No 1
3 Yes 0
3 No 2

and from this you will be able to produce a "nice report".
 
G

GabrielG

Thanks so much for the info. The link of this website contains a lot of good
info.
The way I have it setup is that I have a table with codes and I created a
form base on the table with options to select yes or no answer.
The hard part is to gather all this information and find out how many "Yes"
and "No" answers I have and have a nice report.
Thanks again.
 
S

Steve Schapel

Gabriel,

The way to "gather all this information" is to use a Totals Query. To
use the field names taken from the example I gave in my earlier reply,
just make a query based on your table, add the fields to the query
design grid in the order QuestionNumber, YesNoAnswer, RespondentID.
Make it a Totals Query (select Totals fromthe View menu), then in the
Totals row of the query design grid, leave Group By in the
QuestionNumber and YesNoAnswer columns, and enter Count in the
RespondentID column.

Then you can use the feilds from this query as the basis of your report.

If you need more specific help, you will need to give some more detailed
information about the fields you have now, and the way you want your
report to look, maybe with examples.
 

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