hmurti17
April 1st, 2001, 07:53 AM
I am doing a project on online examination. I have entered data (questions) into the database. I would be thankful if someone could suggest the code for automatically random selection of data(questions) when a user appears for the test.
Thanks.
vchapran
April 1st, 2001, 09:17 PM
This gives you a random number:
private Sub Command1_Click()
dim sngRandom as Single
sngRandom = Rnd(1)
MsgBox sngRandom
End Sub
Then you can manipulate it, let's say selecting 3rd and 5th digits, or multiplying returned number by 100 and getting last 3 or first 4 (whatever) digits. If you have limited number of questions (let's say 75), then in case you got the number greater than 75, subtruct somthing (can be random too, or static), or divide, or ....
Vlad