----------------------------------- alpesh Tue Jan 27, 2004 10:37 pm Sorting records ----------------------------------- :( :( :( :( :( :( Any body have any idea ... how to sort record in database through VB :oops: :oops: ----------------------------------- McKenzie Tue Jan 27, 2004 10:57 pm ----------------------------------- 1. Add ListBox, Data Contol, CommandButton 2. Attach Data control 3. Set ListBox sorted property to true Do While Not Data1.Recordset.EOF List1.AddItem Label1 Data1.Recordset.MoveNext Loop ----------------------------------- Acid Tue Jan 27, 2004 11:07 pm ----------------------------------- Well that's what I'd have suggested, if I knew just a little bit more about VB :wink: ----------------------------------- Tony Tue Jan 27, 2004 11:33 pm ----------------------------------- 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. ----------------------------------- McKenzie Wed Jan 28, 2004 12:05 am ----------------------------------- you can use DAO and ADO either way. MS is pushing ADO but DAO is still easier to start with.