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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|