Adding results of forms in a survey

T

TG9522

I have a form that has checkmarks for answers to questions. How do I compose
a query that will add up the number of checkmarks in each field? I am new to
Access.
 
D

Damian S

Hi TG9522,

Start a query and then click the Totals button to show you the grouping
fields.

Add the field to display the question, then add the following as the next
field:

iif([NAMEOFCHECKBOXFIELD], 1, 0)

Have the Checkbox field set to "sum", and the question field set to group by.

This will return the number of ticked questions per question.

Hope this helps.

Damian.
 
J

John Vinson

I have a form that has checkmarks for answers to questions. How do I compose
a query that will add up the number of checkmarks in each field? I am new to
Access.

First:

Forms DO NOT contain any data. They're just windows, tools to let you
edit data in Tables. Get your Table structure right first, and *then*
start thinking about Forms!

Second:

Don't use one field per question. What will you do if you need to add
another question, or remove a couple? Redesign your table, your form,
all your queries, all your reports? Ouch! Instead use THREE tables:

Questionnaires
QuestionnaireID
LastName
FirstName
<other info about the person taking the questionnaire>

Questions
QuestionNo
Question <text>

Answers
QuestionnaireID <who answered it>
QuestionNo <which question are they answering>
Answer Yes/No <what was their answer>

See

http://www.rogersaccesslibrary.com/Otherdownload.asp?SampleName='At Your Survey 2000'

for a thoruoughly worked-out example.

John W. Vinson[MVP]
 

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