Cascading Combo Box

jschlapi

New Member
Joined
Aug 8, 2008
Messages
49
Help - I'm getting a bit goofy with this.

My form: has 4 cascading combo boxes - they work perfectly.

1st combo box updates my main table just fine - my #2 box (which is dependent upon 1st combo box choice) does not feed to my main table. After reading several threads, I think I want something in the AFTER UPDATE of box #2, but I'm not sure what it is.

FORM NAME: WORK ORDER FORM
TABLE NAME: WORK ORDER MAIN TABLE
COMBO BOX 1 NAME: EQUIP NUMBER
COMBO BOX 2 NAME: EQUIP NAME (fills in correctly as soon as BOX 1 is done)

Does anyone have a suggestion of how I can get my BOX 2 to populate my WORK ORDER MAIN TABLE?

Thank you so much for reading this & any suggestions/ideas!!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
What's the rowsource a d controlsource for each combobox?
 
Upvote 0
All 4 comboboxes have the same rowsource?
 
Upvote 0
Box 1 is not cascading - I chose an Equipment Number; from there, combo boxes 2, 3 & 4 populate with EQUIPMENT NAME, OIL TYPE, QTY.

Every entry in my form will populate my WORK ORDER MAIN TABLE. I do not need Oil Type or Qty in my Main Table - only EQUIPMENT NUMBER and EQUIPMENT NAME. Equipment Number populates the main table because I specified that when I built that combo box. However, in the cascading boxes, it did not give me that choice.

So, in reading the different threads, I think I need something in AFTER UPDATE - does that sound right?
 
Upvote 0
If all four combos have the same rowsource you're making extra work for yourself.
You could instead use one combo and three texboxes. Bind the first one to the Equipment Name field. Leave the ohter two unbound. Then, in the AfterUpdate event for the combo, put this code:

Code:
Me.[EQUIPMENT NAME]=Me.MyCombo.Column(1)
Me.TextBox2=Me.MyCombo.Column(2)
Me.TextBox3=Me.MyCombo.Column(3)

Adjust the names of the controls to match; if there are spaces in the names, enclose them in square brackets.

Combo and listbox column numbering starts at 0 so 1,2,3 are columns 2,3,4 from the rowsource query.

Denis
 
Upvote 0
If I do this, do you think EQUIPMENT NAME will be able to feed to my WORK ORDER MAIN TABLE in the Equipment Name field?
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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