Conditional combo box

vavs

Well-known Member
Joined
Jul 2, 2004
Messages
514
I have a form with 3 combo boxes on it. Customer, Vendor and PO. I have the boxes set up to filter based on the information in the other boxes. Currently I have it set so that based on the vendor only the POs for that Vendor will show up. I also have the customer based on the PO. My problem is that now the users want to sort by the Customer independent of the Vendor or PO. The way I set this up is to build a query for the row source based on a value in the combo box. I then have an event set for on change to requery the next combo box.

What I want to do is have the Customer combo box come up with all customers initially and only requery if the PO is entered. Is there some event that I am missing and can I load values initially and then change them once a value is entered in the PO?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
There's no hidden event that lets you uncouple the second combo; you need to change the rowsource in code. Here is an example.

Denis
 
Upvote 0
Thanks Sydney. That is what I ended up doing. I have the if statement to check for the value in the combo boxes and if they are both either null or blank(someone may have deleted the value) then I list all records otherwise I select based on one or both of the combo boxes.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top