Multiple Choice

J

Jacinda

I am working on a school project with my daughter... we are creating a
Database that will give you a test based on the questions and answers that we
will load into the DB.

I have already figured out how to pull the answers onto the subform in
random, so that the correct answer is not always in the first slot- what I
would like to add to the query is a way to add an "A - B - C - D" to each of
the answers every time the query is generated, so that we can select from the
multiple choice answer...

Here is the query:
SELECT TOP 4 Rndnum([id]) AS Shuffle, Rnd(Len([ID])) AS EXPR1, TANSWERS.ID,
TANSWERS.Answer, TANSWERS.Correct, TANSWERS.QID
FROM TANSWERS
WHERE (((TANSWERS.QID)=[Forms]![FExams]![FQuestions].[Form]![ID]))
ORDER BY Rndnum([id]);

So basically I want to create a field that would put the 4 answers in random
order and assign a letter to each answer
 
K

KARL DEWEY

Why not put the A, B, C, & D as static labels along side the subform for the
answers?
 
J

Jacinda

I thought about that, but then when the user enters in A,B,C, OR D... how
will I compare it to the correct answer?... Right now on my Answers Table I
have a check box for the correct answer- so what parameter would I use to see
if the user entered in the correct answer or not... or how do I connect the
answers to the A B C or D slot?

I'm probably over thinking this....
--
-Jacinda


KARL DEWEY said:
Why not put the A, B, C, & D as static labels along side the subform for the
answers?

--
Build a little, test a little.


Jacinda said:
I am working on a school project with my daughter... we are creating a
Database that will give you a test based on the questions and answers that we
will load into the DB.

I have already figured out how to pull the answers onto the subform in
random, so that the correct answer is not always in the first slot- what I
would like to add to the query is a way to add an "A - B - C - D" to each of
the answers every time the query is generated, so that we can select from the
multiple choice answer...

Here is the query:
SELECT TOP 4 Rndnum([id]) AS Shuffle, Rnd(Len([ID])) AS EXPR1, TANSWERS.ID,
TANSWERS.Answer, TANSWERS.Correct, TANSWERS.QID
FROM TANSWERS
WHERE (((TANSWERS.QID)=[Forms]![FExams]![FQuestions].[Form]![ID]))
ORDER BY Rndnum([id]);

So basically I want to create a field that would put the 4 answers in random
order and assign a letter to each answer
 
J

Jacinda

This is kind of the anwer to my problem... http://www.lebans.com/rownumber.htm

--
-Jacinda


Jacinda said:
I thought about that, but then when the user enters in A,B,C, OR D... how
will I compare it to the correct answer?... Right now on my Answers Table I
have a check box for the correct answer- so what parameter would I use to see
if the user entered in the correct answer or not... or how do I connect the
answers to the A B C or D slot?

I'm probably over thinking this....
--
-Jacinda


KARL DEWEY said:
Why not put the A, B, C, & D as static labels along side the subform for the
answers?

--
Build a little, test a little.


Jacinda said:
I am working on a school project with my daughter... we are creating a
Database that will give you a test based on the questions and answers that we
will load into the DB.

I have already figured out how to pull the answers onto the subform in
random, so that the correct answer is not always in the first slot- what I
would like to add to the query is a way to add an "A - B - C - D" to each of
the answers every time the query is generated, so that we can select from the
multiple choice answer...

Here is the query:
SELECT TOP 4 Rndnum([id]) AS Shuffle, Rnd(Len([ID])) AS EXPR1, TANSWERS.ID,
TANSWERS.Answer, TANSWERS.Correct, TANSWERS.QID
FROM TANSWERS
WHERE (((TANSWERS.QID)=[Forms]![FExams]![FQuestions].[Form]![ID]))
ORDER BY Rndnum([id]);

So basically I want to create a field that would put the 4 answers in random
order and assign a letter to each answer
 

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