Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop Down Menus

Status
Not open for further replies.

dek394

Technical User
Apr 16, 2003
17
US
Hi everyone,
I was wondering if anyone knew how to link 3 or 4 different drop down menus. What I mean is that in the first menu you have a choice between 3 items (item1 item2 item3). Then, depending on the selection the user made there would be different choices in the second menu. If you chose Item1, then in the second menu you get option1and option2 but if you chose item2 then you would get option3 option4 and option5 in the second drop down. I hope someone is understanding this because I am haveing a hard time explaining it. Basically I got the idea from trying to find a used car and if you chose Honda in the first menu, then the second menu would give you a choice of all the different types of hondas. Let me know if anyone has any ideas or knows how to do this. Thanks in advance.

Dennis
 
Well, unfortuntely, I dont have an answer for you. I've been trying all day to get the same idea, or something similar to work. Access keeps finding a way to fail at every turn, though.
 
Let's use the Honda example and three combobox controls.

ComboBox1 will be car makes, ComboBox2 will be car models, ComboBox3 will be car colors.

3 tables would be used Makes, Models, and Colors.

The Makes table has one field called Make. The Models table has two fields; Make and Model. Colors has three fields Make, Model and Color.

In the AfterUpdate event of the ComboBox1, you set the rowsource of ComboBox2:

Me![ComboBox2].RowSource = "Select [Model] FROM [Models] WHERE [Make] = '" & Me![ComboBox1] & "'"

This selects all Models that have the Make you have selected in CombBox1.

Then in the AfterUpdate of ComboBox2;

Me![ComboBox3].RowSource = "Select [Color] FROM [Colors] WHERE [Make] = '" & Me![ComboBox1] & "' AND [Model] = '" & Me![ComboBox2] & "'"

This gets available colors for the Make and Model you have selected.

Hope this helps!



Anthony J. DeSalvo
President - ScottTech Software
"Integrating Technology with Business"
 
Im going to try to implement this right now... hope i can figure out how. Im pretty new at this.

Thanks

-Mark
 
Wow, yeah that makes sense, I think I know what youre saying. Thanks a lot.

Dennis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top