Sorting

jcruzAME

Registered User.
Local time
Yesterday, 18:26
Joined
Oct 5, 2011
Messages
135
Okay, I have a few listboxes on a page that have several columns. Is there a way to requery these and just say order by somehow instead of having to rerun the whole query with a different order by?

Thanks in advance.
 
To answer your question no there isn't. A listbox doesn't have a OrderBy property like forms do.
 
Okay, I was just wondering if I could do something like ListBox.Requery ORDER BY or something similar. At the moment I'm just setting the row source again except applying a Ascending or Descending sort.

Thanks for the reply!
 
You will still have to:

1. Build the Row Source of the Listbox in code
2. Set the Row Source of the Listbox to the SQL statement from step 1
3. Requery the Listbox

Whereas, in a form, you could use the form's OrderBy and OrderByOn properties and it takes care of the rest.
 

Users who are viewing this thread

Back
Top Bottom