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

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

SydneyGeek

MrExcel MVP
Joined
Aug 5, 2003
Messages
12,251
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
 

vavs

Well-known Member
Joined
Jul 2, 2004
Messages
514
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,421
Messages
5,831,521
Members
430,075
Latest member
Francis101

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
Top