|
-
April 1st, 2001, 07:53 AM
#1
random selection of data
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.
-
April 1st, 2001, 09:17 PM
#2
Re: random selection of data
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|