Link to home
Start Free TrialLog in
Avatar of Svgmassive
Svgmassive

asked on

Cascading Multiselect Listbox

I would like to create a listbox row source based on a selection in another listbox.Any examples for Ms Access
ASKER CERTIFIED SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In this regard, listboxes work the same way that combos work.  In the dependent listbox's RowSource include selection criteria that references the controlling listbox.

Select ... From ... Where thePK = Forms!myform!lstMajor

Then in the AfterUpdate event of lstMajor, requery the dependent listbox

me.lstDependent.Requery

Or, if you prefer, you can use any other "cascading combos" solution.
Actually depends if you need to have more then one value selected, if yes then set the list box multi select property to either simple or extended and use John's suggestion otherwise set muti select to none and use it the way Pat has suggested.