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

combo box linked that populates more combo boxes

Status
Not open for further replies.

DanEaton

Technical User
Jun 24, 2002
60
CA
I have a problem and can think of two logical solutions (neither of which do i know how to implement). I am looking to create a search form that prompts users to pick a product out of a combo box. There will be 8 main product categories. Once they select a category and presumably hit a button, they will be directed to a second combo box populated only with the product sub-categories associated with the one they chose. In other words, there are 8 categories, and at least 120 sub-categories and I think it would be foolish to have just one big combo box. Another alternative would be some kind of custom feature I could get that was similar to the start menu on windows. ie. If you focused on, or clicked, programs, it would bring up what is contained within programs beside the little arrow icon. Anyway, I wouldn't know how to implement either one of these two methods (the combo box to combo box, or the start menu). If anyone can show me the light, or send me down another path I would really appreciate it.

 

Hi

to complete the combo box scenario
first make sure that your first combo box has the category id included - you can hide it later by setting its width to 0 but for the moment keep it visible

the second combo box is then source by a filter on the categoryid
eg:-
forms!frmname!cmboName!column(0)
this would then (when form is open of course) take the value of the category id from the selection you made in your first combo box

Now you have the stage set and all you have todo is requery the second combo box.

To do this go to the afterupdate event of your first combo box and put
me!cmboBox2name.requery

This will refine the subsets - you can apply this process to however many subsets you require

hope this helps

jo
 
Thanks a lot. That's a great tip and I think I get it. I was wondering though, does the "source by a filter on the Categoryid" mean that I have to make a query to extract the info and base the combo box on it, or is it something to do with the combo boxes properties that i can change?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top