473,379 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Randomize fields

Hi All,

I have an Access DB of Questions, Answers, and Distractors. The field
names are as follows: Question, Choice1, Choice2, Choice3, Choice4,
CorrectAnswer

Choice1 at present contains the correct answer. Choices 2-4 are
distractors. CorrectAnswer denotes which of Choice1-4 is the correct
answer.

What I need is a module that will randomize the correct answer among
Choice1-4 and note which is correct in CorrectAnswer.

Can anyone help?

Thanks in advance!
Nov 13 '05 #1
3 1780
HJ
Do you want to reshuffle the data in the table itself? Or do you want to
present the answers in a random order to the user?

In either case message 8 in this discussion may help:
http://groups.google.nl/groups?hl=nl...cess%26hl%3Dnl

HJ

"Rob South" <ro**********@hotmail.com> wrote in message
news:8b**************************@posting.google.c om...
Hi All,

I have an Access DB of Questions, Answers, and Distractors. The field
names are as follows: Question, Choice1, Choice2, Choice3, Choice4,
CorrectAnswer

Choice1 at present contains the correct answer. Choices 2-4 are
distractors. CorrectAnswer denotes which of Choice1-4 is the correct
answer.

What I need is a module that will randomize the correct answer among
Choice1-4 and note which is correct in CorrectAnswer.

Can anyone help?

Thanks in advance!

Nov 13 '05 #2
Rob,

I suggest you first redesign your table into two tables ----
TblQuestion
QuestionID
QuestionNum
Question
AnswerID 'CorrectAnswer

TblAnswer
AnswerID
QuestionID
Answer

For each question you would have four records in TblAnswer; four different
AnswerIDs, same QuestionID in all four records and four different Answers.
You would then randomly assign the correct Answer to one of the four
AnswerID noting the value of which AnswerID got the correct Answer and
assign that value to AnswerID in TblQuestion. Implementation is far from how
simple it sounds!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com


"Rob South" <ro**********@hotmail.com> wrote in message
news:8b**************************@posting.google.c om...
Hi All,

I have an Access DB of Questions, Answers, and Distractors. The field
names are as follows: Question, Choice1, Choice2, Choice3, Choice4,
CorrectAnswer

Choice1 at present contains the correct answer. Choices 2-4 are
distractors. CorrectAnswer denotes which of Choice1-4 is the correct
answer.

What I need is a module that will randomize the correct answer among
Choice1-4 and note which is correct in CorrectAnswer.

Can anyone help?

Thanks in advance!

Nov 13 '05 #3
I'm really wanting to just keep the data in the one table and shuffle the
contents of Choices1-4 field in each record and then keep track of which of
the 4 Choices is the correct answer and keep that number in the
CorrectAnswer field.

I'm pretty good at Pascal and a little C, but I have no clue how to write
this module for Access.

The table I'm wanting to shuffle the fields on is to be used to generate a
multiple-choice exam. I need to generate an anwer key for it as well.

Thanks again for you help on this!
"HJ" <hj********@spamhotmail.com> wrote in message
news:41***********************@news.xs4all.nl...
Do you want to reshuffle the data in the table itself? Or do you want to
present the answers in a random order to the user?

In either case message 8 in this discussion may help:
http://groups.google.nl/groups?hl=nl...cess%26hl%3Dnl
HJ

"Rob South" <ro**********@hotmail.com> wrote in message
news:8b**************************@posting.google.c om...
Hi All,

I have an Access DB of Questions, Answers, and Distractors. The field
names are as follows: Question, Choice1, Choice2, Choice3, Choice4,
CorrectAnswer

Choice1 at present contains the correct answer. Choices 2-4 are
distractors. CorrectAnswer denotes which of Choice1-4 is the correct
answer.

What I need is a module that will randomize the correct answer among
Choice1-4 and note which is correct in CorrectAnswer.

Can anyone help?

Thanks in advance!


Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fieldmedic | last post by:
I'm trying to determine the best way to randomize a set of array items. I'm thinking that I could use an arraylist and have it use the lower and upper bounds as the limits. Any suggestions? ...
3
by: Gaffer | last post by:
Hello Is there a way in which I can make certain parts of Html on my website random so that each viewer will see different material if they refresh the page or come back onto the website later?...
1
by: Ellen Manning | last post by:
I've got an A2K database with a report that generates any number of random medical record numbers. The user inputs how many numbers they want and report uses the Randomizer function found on "The...
4
by: Mr. x | last post by:
Hello, randomize is a function in vbscript. What is the function for vb ? (I have tried to use that command in the script in web-service of .net, which used VB and not VBScript). Thanks :)
2
by: Rich | last post by:
Here is what I am trying for randomizing 2 numbers in the same subroutine so that they are not equal to each other: Dim j As Integer, k As Integer j = New System.Random().Next(0, 10) k = New...
4
by: Arnold | last post by:
Hi there, Here's the situation--there is a text field in a form in which students will key in data. On the keypress event, I'd like for different sounds to be played for each character typed,...
1
by: Badass Scotsman | last post by:
Hello, This code is supposed to generate a random string each run, however I have had it live on a few sites, and it seems to create repeat strings all over the place. ...
1
by: VBSTUDENT | last post by:
I am just wondering if there is a way to randomize the aritmetic operators in code, I know how to randomize numbers but I am not sure if it is possible to randomize operators. Any help would be...
5
by: gggram2000 | last post by:
Hi, I'ved spent two full days trying to find a solution, I can randomize numbers between two ranges and it works fine, But my problem is when i want to randomize five numbers that I got. eg. I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.