A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Multiple Choice



 
 
Thread Tools Display Modes
  #1  
Old April 23rd, 2010, 07:28 PM posted to microsoft.public.access.queries
Jacinda
external usenet poster
 
Posts: 41
Default Multiple Choice

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
--
-Jacinda
  #2  
Old April 23rd, 2010, 09:14 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Multiple Choice

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" wrote:

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
--
-Jacinda

  #3  
Old April 26th, 2010, 04:00 PM posted to microsoft.public.access.queries
Jacinda
external usenet poster
 
Posts: 41
Default Multiple Choice

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" wrote:

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" wrote:

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
--
-Jacinda

  #4  
Old April 27th, 2010, 07:12 PM posted to microsoft.public.access.queries
Jacinda
external usenet poster
 
Posts: 41
Default Multiple Choice

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

--
-Jacinda


"Jacinda" wrote:

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" wrote:

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" wrote:

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
--
-Jacinda

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.