Randomizing A Recordset In VB6
$30-100 USD
Pagado a la entrega
I have an application written in VB6 that basically is a multiple choice test generator using an Access 2.0 database file. I want the user to be able to select the number of questions to answer and then have the software display the questions in random order. I wrote the same application in VB3 and it works great, but it does not work correctly in VB6. In VB6 the code below randomizes the questions, but it always generates the same ramdom order, instead of truly randomizing the order. What I need is someone to modify the code I have listed below so that it works correctly with VB6, as it did with VB3. Here is the code. Dim TestNum As String TestNum = InputBox("Enter Number Of Questions You Would Like Included From This Chapter.", "Create Random Test From ") If TestNum = "" Then Exit Sub End If If TestNum = "0" Then Exit Sub End If Call Randomize [url removed, login to view] = "SELECT Top " & TestNum & " * FROM table1 where chapter='" & [url removed, login to view] & "' ORDER BY Rnd(id);" [url removed, login to view] End If As I said, in VB3 it worked flawlessly, but in VB6 is as if the Ramdomize statement is not working.
## Deliverables
I just need the modified code, so that when executed it will come back with a truly randomized order, not the same random order each time the program is run.
## Platform
As I said this is written in VB6, so it should work with Windows 95, 98, ME, 2000, XP.
Nº del proyecto: #2896064