tabing16
asked on
copy file into listbox
how can i copy the record (e.g. Street Name field) in the database into the listbox ?
ASKER
I'm sorry, let me correct my question...i had succeeded to load the database field (Street Name field) into the listbox, i did the random function to the field using SQL statement, but the problem is it was sequential random, what i want is a random result that is different everytime I start the application, and one more problem is i could not put randomize keyword inside the SQL statement, is there anyway to do random function outside the SQL statement but affect the result ot Street Name and put the random result into the listbox ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim rsList as ADODB.Recordset
Set rsList = new ADODB.Recordset
With rsList
.Open "SELECT CompanyName FROM Customers", "PROVIDER=SQLOLEDB;Integra
While Not(.EOF)
lstNames.AddItem .Fields(0).Value
.MoveNext
Wend
End With