Solved

Dynamically Linked multi-Selection Box in Access

Posted on 2012-04-12
4
308 Views
Last Modified: 2012-05-08
Greeting,

I want to create 3 dynamically linked multi-selection box on an Access 2007 form like the following.

I have 3 columns in the table with data in there: State,City,city Name

Below is what I want.

On the form, If the users select in state listbox(can be multiple), the associated cities(can be multiple) will show up in the city listbox, also the matching city names will show in city Name listbox.

Please provide sample if possible.

Thanks.
0
Comment
Question by:mrong
  • 2
4 Comments
 
LVL 39

Expert Comment

by:als315
ID: 37837671
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37837862
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37837878
Note that most of these links involve "Combo boxes", not Multi-select Listboxes.
Multiselect Listboxes, present their own set of complexities...

In many cases it may be simpler to just use Forms and subforms...
0
 
LVL 31

Accepted Solution

by:
Helen_Feddema earned 500 total points
ID: 37838719
Here is a basic description of linked combo boxes; it could also be used for single-select listboxes:

cboSelectCustomer has tblCustomers as its row source.  Its AfterUpdate event sets cboSelectOrder to Null or "", and requeries cboSelectOrder.
cboSelectOrder has tblOrders as its row source, with a criterion of [Forms]![frmSelectOrder]![cboSelectCustomer]

However, with multi-select listboxes the problem is much more complex.  My Access Archon article on Filtering by Multiple Selections might be useful:

http://www.helenfeddema.com/Files/accarch197.zip

Here is a screen shot of the form, showing multiple state selections used to filter a subform:

Filtering by Multiple Selections in Listbox
You would need to use the multiple selections in a listbox to filter the row source for the next listbox in the cascade.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question