By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,486 Members | 2,169 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,486 IT Pros & Developers. It's quick & easy.

listbox -> filter -> listbox

P: n/a
how do I create a list box that I can use to filter the records in
another list box on a form.

May 4 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
use an afterupdate on the first listbox to set the rowsource on the
second listbox based on the bound field in the first listbox.

Private Sub ListBox1_AfterUpdate()
ListBox2.RowSource = "SELECT Field1, Field FROM Table WHERE
Colmun1 = " & ListBox1

End Sub

May 4 '06 #2

P: n/a
if you set the MultiSelect property of the listbox to Extended
(something other than single), then you have to iterate through the
collection of selected items.

Dim varItem as variant

for each varItem in lbx.ItemsSelected
debug.print lbx.ItemsSelected(varItem)
next varItem

It's on www.mvps.org/access Look up "multi-select" and you'll find it.

May 5 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.