Please don’t take offense at this,but I think I need to turn on a big RED LIGHT with your table setup.
Let’s start back at the very beginning of things, and let me ask you two very fundamental questions:
- Does the specification with which you must comply explicitly state that you must store each approved vendor’s approved parts list in its own separate table?
- Or, instead, is the specification a performance requirement: you must only allow the user to select an approved vendor, and then only allow the user to select from the specific approved parts associated with that vendor?
If the answer to question 1 is Yes,then you have a big problem on your hands, because you’re being forced to design an application that is essentially unmanageable: You will need to totally rewrite the application every time you add anew vendor and their associated parts: all of your queries, all of your forms, all of your reports will need revision to even recognize the newly added resources.
If your specification is a performance requirement (number 2), then you can make life a lot easier by putting all of the approved parts into one table, with a vendor number assigned to each part that shows which vendor supplies it. If you design your tables this way, all you need to do to add a new vendor is add the vendor to the Vendors list, and their parts to the Parts list. Your queries, forms and reports will automatically recognize the new items without any need for re-design.
Queries, forms and reports are the items that, when properly designed, will shield your users from ever being able to select one of Vendor B’s parts after they’ve selected Vendor A: after the user has selected Vendor A, the only parts that will be visible to the user are Vendor A’s parts. If they haven't even selected a vendor, then no parts at all will be visible.
If this is what you want, and are willing to combine all your parts into one table, I and others on the board would be willing to assist and advise you on how to get the application to work the way it needs to. If you insist on maintaining separate parts tables for each vendor then I, at least, will bow out – I don’t see an easy, practical way to achieve a maintain-able product with this setup. It’s your call.
Steve