IIF statement for multiple answers?

G

Guest

How do I take a multiple choice (one choice allowed) written question and
convert that chosen answer to a number. For example,
Question: What color do you see?
a) red
b) green
or
c)yellow

with red being 5, green 10 and yellow 15?
Do I use an IIF statement? How?

Thanks in advance, Paul
 
G

Guest

Hello Paul,
I may think two ways of doing that: 1) Using the IIF statement and 2) Using
a related table having the answers (red, green, etc) with appropriate numbers.
1) If your fieldname is ANSWER: name a column in your query i.e. result:
iif([answer]="red", 5, iff([answer]="green", 10))... continue with more IIFs.
2) Create a table with 2 fields (answer-text, Primary key and code-number,
byte)
Use this table in your query, relate the answer of the above to your
existing table, add code field in the query.
Hope this will help,
George

Ο χÏήστης "paul69" έγγÏαψε:
 

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