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!

Selecting from dropdown, to let specific records be on show 1

Status
Not open for further replies.

mattpearcey

Technical User
Mar 7, 2001
302
GB
I have a form that is product related. I want the user to be able to select a manufacturuer from one drop down, that will then in turn allow only products from that manufacturer to be on display and to be picked from another drop down (for ease of input). Could someone advise me as to how this is done?

Eg. Click on IBM on the first drop down field, and only IBM products are available to be picked from the next drop down field.

Sorry if it is a bit confusing. Thank you for your help already.

Matt Pearcey
 
This question gets asked from time to time. I've added a FAQ that I hope will cover it. Please click on this link: faq702-681. Rick Sprague
 
Thanks for the FAQ. It looks just what i am after. However, i am having a stab at it now, and i think i am confusing myself as to the SQL statement. I havenot used SQL before, so bare with my on this one if i seem a lttiel stupid. I have three combo boxes for vendor [which i have 3 vendor names], next to those, i have threee product combo boxes [which at present have all the product names in a lookup table that i create it he wizard]. I have three of the same combo as they might be using more than one supplier or software product.

so, which combo do i have to go to in order to make the changes, so that whenthey select the vendor, only that vendor's product appear? Do i have to go back to the table desig and get rid of the values that i entered for the lookup?

A bit confused? Thank you for your help already.

Matt Pearcey
 
Three combo boxes for vendors and three for products. It sounds as if this is some sort of order form with controls allowing to pick three vendor/product pairs, am I right?

If so, just treat each pair of combo boxes separately, as if they were on different forms. Create an AfterUpdate procedure for each of the vendor boxes, changing the name of the product combo in the Requery statement to the corresponding product combo box of the pair.

Likewise, change the form reference in each product combo's row source (or underlying query) to refer to the corresponding vendor combo.

"Do i have to go back to the table desig and get rid of the values that i entered for the lookup?" I don't understand the question. Do you mean you keyed in the values for both the vendor and product combo boxes as a Value List? If so, we're playing in a whole different ballpark than my FAQ was meant for (but it's all still doable, and might even be easier). Rick Sprague
 
Rick

Sorry this has taken long to get back to you with regards to your response to my thread. I have typied in values for both the vendor and the product name as a value list. I think you may be correct in that this might be easier, but i have got a littel side traked with anohter issue and am trying to remember how i did this first of all. So, i have starting again, firstly with a test DB, to get this combo box thing sorted. so i am making two tables, one for hardware and one for software. On ewach table i have HWVendor1...to HWVendor3, then HWName1....to HWName3. So, for test purposes, i am just going to use made up names. So i have say 4 vendors, which i will type in the values for, then the hardware products for each vendor. And the same with the software. NOw, here is the main part. I got it working before, but backwards, and a bit weird. But i want only the products for Vendor Test Ltd to come up in the second combo box when Vendor Test Ltd is selected in the first combo box. Get it? I am suyre this is very simple, but i am getting very confused. Help?
Thank you for your help already.

Matt Pearcey
 
Matt,
Do I understand you to say that you have vendors & hardware in one table and vendors & software in another table. If so we need to talk. We would need to do a quick and easy re-work of your tables first.

Tom tomco22
tbrashier@vectormachinery.com
 
OK - so i have this working now, however, i am havig problems to linking the newly created data to the main record. Basically, i have a main table, which hold the main info of my records. All the forms are there to show the detaisl of each record. However, i have had to create two new tables in order to make there combos to work, and now i cannot get the combos to save and relate to the record on view. So, i have added these combos to one of my forms, but now i can use them to enter show data of these records, but they do not sae anywhere. How do i get around this? Thank you for your help already.

Matt Pearcey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top