Filters and List Box Display

redpoppy

Registered User.
Local time
Today, 23:13
Joined
Apr 11, 2001
Messages
14
I'm displaying records for update in a list box on a form. All works fine for the full record set, but I want to be able to apply a filter to just work on a subset (Ie: previous months records only).
I'm using command buttons to apply the filter and to remove it and I know these are working from the number of records displayed on the record selectors but I can't get the list box to show only the filtered records. After ploughing through the manuals, I've tried refresh, requery and repaint but none of them seem to work. Any suggestions please?
 
One thing I've done is setup a combo box on the form with different selections and the recordsource of the listbox using the combobox as a criteria.

Then you can set up the requery property on the combobox after_update event.
 
redpoppy said:
I'm using command buttons to apply the filter and to remove it and I know these are working from the number of records displayed on the record selectors ...

It sounds as if you are applying the filter to the form and not the listbox. Otherwise the requery should work.

Code:
lstMyList.rowsource = "SELECT * FROM [myTable] WHERE [myID] = 1"
lstMyList.requery

Dave
 

Users who are viewing this thread

Back
Top Bottom