Posted: Tue Jan 27, 2004 10:37 pm Post subject: Sorting records
Any body have any idea ...
how to sort record in database through VB
Sponsor Sponsor
McKenzie
Posted: Tue Jan 27, 2004 10:57 pm Post subject: (No subject)
1. Add ListBox, Data Contol, CommandButton
2. Attach Data control
3. Set ListBox sorted property to true
code:
Do While Not Data1.Recordset.EOF
List1.AddItem Label1
Data1.Recordset.MoveNext
Loop
Acid
Posted: Tue Jan 27, 2004 11:07 pm Post subject: (No subject)
Well that's what I'd have suggested, if I knew just a little bit more about VB
Tony
Posted: Tue Jan 27, 2004 11:33 pm Post subject: (No subject)
or if you're accessing your database using DAO method (my personal preference over DB linked elements) you can just have sort=accending/deccending in your SQL statement.