Filter a Listbox

  • Thread starter Thread starter Randy Harris
  • Start date Start date
Not directly to the listbox. You need to change the row source of the
listbox to a query that allows you to do the filtering. This query could use
a control on the form to filter its records; the query would contain a
reference (in the "Criteria:" expression) to that control. When you want to
"refilter" the query, you Requery the listbox.

Note that it is possible to change the Row Source programmatically and then
Requery the listbox.
 
Ken Snell said:
Not directly to the listbox. You need to change the row source of the
listbox to a query that allows you to do the filtering. This query could use
a control on the form to filter its records; the query would contain a
reference (in the "Criteria:" expression) to that control. When you want to
"refilter" the query, you Requery the listbox.

Note that it is possible to change the Row Source programmatically and then
Requery the listbox.

Thanks very much Ken. I've taken to manipulating the Row Source
programmatically, I was hoping that there might be a means of applying a
filter, especially if it could be quickly turned on and off.

Randy
 
Only way to turn on and off a filter is to have a criterion in the listbox's
row source query that sees different values as you requery it. Good luck.
 
Back
Top