×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Multi Select Dependant Listboxes

Multi Select Dependant Listboxes

Multi Select Dependant Listboxes

(OP)
Hi There

I wonder if someone can point me in the right direction as Ive been looking since yesterday but cant find the right code to meet my needs.

I have got a spreadsheet with 5 listboxes. They are set up as multiselect listboxes so that if desired users can select more than one item from the list box , for example they can select function from the first list box and then in the second listbox they can select the department codes that they want to filter by. This works perfectly but ideally I would like to change it so that when they select the function from the first listbox only contains the cost codes that are relevant to the function chosen in the first listbox.

Can anyone point me in the right direction of how to do this?

RE: Multi Select Dependant Listboxes

Hi Elsie

Make the result of the first Listbox, a criteria value for a query from a list or table...

SELECT COST_CODE
FROM LIST
WHERE DEPT = ?

Of course, the field/table names are fictitious.

This is accomplished via MS Query: Data > Get external data > From other sources > From Microsoft Query... and drill down to your workbook.

The ? Indicated a “parameter” query. The paramater can come directly from your sheet in the cell containing the SelectedDepartment. I like to use Data Validation (DV) > List rather than a control object.

Your Query resultset can then be the source to another Listbox or DV DropDown, etc., etc., ets...

FAQ68-5829: Using MS Query to get data from Excel

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close