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
Microsoft Access

Avatar of undefined
Last Comment
bfuchs
ASKER CERTIFIED SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of PatHartman
PatHartman
Flag of United States of America image

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.
Avatar of bfuchs
bfuchs
Flag of United States of America image

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.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo