[QUOTE=tjbvo]
Greetings
I have placed comments in both subs.
Hope this will be of help.
Private Sub Test()
Dim RndNum As Long ' declare variable
Dim strCount As Long ' declare variable
For i = 0 To 5 ' setup count
If strCount = 1 Then ' setup initial start point
i = i - 1 ' reduce start point by one
strCount = 0 '...
User Profile
Collapse
-
[QUOTE=tjbvo] Hi. Apologies.
The code "Private Sub Test()" is to do the random selection, and also to eliminate any duplicates.
The code "Private Sub Finder()" is to randomly select the data from the database.
However, when the cmdNext button is clicked, nothing happens. It is supposed to display the next random data in the lblQuestion, optA1, optA2, optA3 and optA4 fields/controls....Leave a comment:
-
Populate Controls Randomly from Access Database
Greetings
I am busy with a program that randomly selects data from a databse and then populates controls with the random data. the user must then select an option that must be stored for printing at the end of the program.
Below I have pasted my code. I am using VB6 and MSAccess Database.
Thanking You in Advance.
Julian
ps. I am a beginner
...Code:Option Explicit
No activity results to display
Show More
Leave a comment: