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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Values code

Status
Not open for further replies.

ba4crm

Technical User
Dec 19, 2003
92
US
Hello everyone,
I have two combo boxes on a form (cbo1 and cbo2). The list of available values in cbo2 changes based on the value chosen in cbo1. Example: cbo1 has airlines and cbo2 has cities.
If:
cbo1 = Southwest, cbo2 should display Austin, Dallas, LA
cbo1 = United, cbo2 should display Austin, Denver, Portland
etc.

I would like to have this done via the After_Update function of cbo1. Can you provide some direction regarding how to do this?

Thank you

 
A simple check of the faqs on this forum yields faq702-4289. A minimal search will find many more references.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Thank you Greg. I probably should have mentioned that I had done an initial check of the FAQs for this, but wasn't sure if the FAQs would meet the needs. I have a many-to-many relationship between the values of the two combo boxes, but I think that the FAQs generally explain a one-to-many sample. I will re-check the forums/FAQs for more references.

Thanks
 
As long as you can set the RowSource for the second combo box based on a query using the value from the first box, you should be ok. What have you tried?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
I was able to set the RowSource with a query to a limited extent. I can only do if: If cbo1 = Southwest, cbo2 = Austin, Dallas, LA. However, I haven't figured out how to add on the second piece (If cbo1 = Northwest, cbo2 = Austin, Denver, Portland).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top