updating listboxes

skate

Registered User.
Local time
Today, 21:15
Joined
May 22, 2002
Messages
136
I have a listbox that filters according to my search. I also have a combo box that chooses how to order the items in the listbox. It works well if I make the selection first then enter my search criteria prior to filter. But right now I am using an "if" statement and if i want to change the sort by criteria from my combo box then the filtered items must be updated and resorted. Suggestions on how I can do this?? thanks!
 
skate-

If I understand your requirement, what I'd do is have an AfterUpdate routine on the combo box that sets the rowsource of the listbox to the base query ordered by the current value of the combo box. After setting the rowsource, requery the list box.

When this works as you wish, be sure to put a call to the combo box's AfterUpdate subroutine in the form's OnOpen event to set the sort order when the form is opened.

Jim
 
actually i want to update the sort on an already filtered list. I tried doing what you said anyways, but it causes my list to go blank and doesn't sort for anything. Ahh..I'm lost
 

Users who are viewing this thread

Back
Top Bottom