Hi There,
I have a number of questions within an Access Database which get read onto a VB front End (I am developing a Quiz). I would like the questions to be provided in a different order each time the program is run - Is this possble???
Thanks
Printable View
Hi There,
I have a number of questions within an Access Database which get read onto a VB front End (I am developing a Quiz). I would like the questions to be provided in a different order each time the program is run - Is this possble???
Thanks
Here's a way. You could randmoize the primary key, basically using a select statement, and fetching the records this way. Does that make sense??
I am assuming that you have a next button, or something to go to the next Question, or something similar. You can have a unique key, and load all the keys into a collectionQuote:
Originally posted by rlculver
Hi There,
I have a number of questions within an Access Database which get read onto a VB front End (I am developing a Quiz). I would like the questions to be provided in a different order each time the program is run - Is this possble???
Thanks
Dim Col as Collection
Dim X as Long
set Col = new Collection
if not rs.bof or rs.eof
rs.movefirst
do until rs.eof
col.add(rs.keyfield)
loop
end if
do until X >= 1 and X<= Col.Count
x = rnd * Col.Count
loop
RS.MoveFirst
RS.Find "KeyField = " & Col(X)
display question
Sorry I dont quite understand what to do
Please HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP!!!!!!