Linked Combo Boxes - Need Help Please

TxSteve

Registered User.
Local time
Today, 13:13
Joined
Dec 28, 2006
Messages
35
Hello World! Looking for Combo Box guidance please.

A while back I posted a message (Combobox Brain Poot) and received lots of assistance linking two boxes. That scenario is still working great to this date.

However, mgt. is now asking me to create three new linked combo boxes. (unrelated to the above)

ex.
Box 1: A/B/C
Box 2: If Box 1 = A-D, B-E/F, C-G/H/I
Box 3: If Box 2 = E-J/K/L, F-M/N and so on...you get the idea.

Is there an example floating around somewhere with three linked combo boxes?
 
>>> ..you get the idea. <<<<

No not really, could you provide more information please
 
Hope this helps -Screen Shot

Screen shot... 3 Box.JPG

When the user makes a selection within the first box, the second box will only display associated items relating to that choice. When the user selects an option for the second box, only related items are displayed in the third box.
 
Humm, I don't doubt that I may not be doing a great job describing it, but I would have thought my screen shot or the existing 2 box working example in Access, or the 4 box example in Javascript that I provided would have done the trick. (My task is to link three combo boxes)

There may be a better way to do this too. I'm all ears if anyone has a better way.

One more attempt at descibing it with a food analogy.

Let's say you are standing in front of an electronic menu with three combo boxes. The first combo has the following options. Breakfast Lunch and Dinner. You select Lunch. The second combo box only displays lunch menu items. (based upon your selection of lunch) Let's say you select a turkey sandwich. The third box only displays specific cookies available for that sandwich. It's important to note that no breakfast or dinner items are shown based upon the initial selection of lunch.

About this time you stop and say to yourself, "Oh what am I doing? It's almost dinner time." So, you go back to the first combo box and select Dinner. Now the middle box only displays available dinner items. You select Steak and Lobster because the sandwiches are not displayed as they are only lunch items. Lastly you select the third combo box and choose pie as cookies are also not shown...being lunch items only... (hope that helps)
 
Last edited:
And the example I directed you to, which part of that example doesn't work as you require?
 
And the example I directed you to, which part of that example doesn't work as you require?

First and Foremost...Thank you for hanging in there with me. I appreciate your patience.

In your example, it appears there is filtering occuring in the bottom portion of the screen, however, the drop boxes have nothing in common that I could see. Another words, it does not matter what I select in the first box (Cutomer Group) the second and third boxes have the exact same content regarless of what is selected in the first box. Granted, filtering occurs below the boxes, but what I need filtered are the boxes themselves not something else (results) on my form.

Re: JavaScript link I provided - If you select an option in box 1 and then you go to box 2 it only has specific options. If you go back to box 1 and make another selection, then box 2 has entirely different options and so on with boxes 3 and 4. This is an perfect example of exactly what I want to do within Access 2003. (only 3 linked combo boxes)
 
If you go back to box 1 and make another selection, then box 2 has entirely different options and so on with boxes 3 and 4. This is an perfect example of exactly what I want to do within Access 2003. (only 3 linked combo boxes)
Steve, there is a very simple way to do this, and it is EXACTLY like writing a criteria query. You can write it in a module under any event you want. What you saw on the JavaScript page can be duplicated in Access by writing this in an event (ON AFTER UPDATE, or ON CHANGE, or WHATEVER)...

Box 1:
Code:
me.box2.rowsource = "SELECT DISTINCT 
[box 2 field] FROM [table] WHERE box1FIELD = 
forms!formname!nameofBOX1"
Box 2:
Code:
me.box3.rowsource = "SELECT DISTINCT 
[box 3 field] FROM [table] WHERE box1FIELD = 
forms!formname!nameofBOX1 AND 
box2FIELD = forms!formname!nameofBOX2;
 
Previously I've had two boxes up and running with no trouble but the third box is killing me. (more precisely the second box of the three) Oddly enough I get the first and third box working but the middle box seems to act odd for me.

I'll look at what you typed up, expand it to three boxes and let you know how I did. Thank you.
 
>>> however, the drop boxes have nothing in common that I could see. Another words, it does not matter what I select in the first box (Cutomer Group) the second and third boxes have the exact same content regarless of what is selected in the first box. <<<<

You are correct, I didn't realize that before! Those combo boxes don't cascade, I have directed people to that example and no one has mentioned it before. I will have to find another example.

Apologies for the confusion.
 
Think I just found it

Looks Like I found it.

You gave me a word that I had not searched with, "Cascade"

I was able to locate this site, http://www.utterangel.com/utterangel.aspx and selected the "Create Cascading Combo Box Sets" example.

Looks like it will do above and beyond for what I need. Neat stuff.

UPDATE: It worked, this is exactly what I needed. I copied my table over to it, ran the utlity to build my three cascade combo boxes. Then copied the three boxes, associated Event codes, associated modules and the Row Source for combo box 1 to my project. Oh, in the interest of time I also copied the list box, but set the visibility to NO as I don't need it. Lastly, I linked the source to each associated column in my table and poof I am done. Took all of ten minutes.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom