The fact that a product may sell to more than one customer, however infrequently, means that there is a either a one-to-many relationship type from Products to Customers, which assumes that each customer can purchase only one product, or a many-to-many
relationship type between Products to Customers, which assumes that, in addition to it being possible for a product to sell to more than one customer, each customer can purchase more than one product. I'm going to forget about your actual table and column
names for now and simply describe a model which corresponds to your description.
1. Assuming a one-to-many relationship type first, the Products entity type has attributes PartNumber and AssemblyPartNumber, both of which are candidate keys, so the table modelling this entity type would be:
Products
....PartNumber (primary key)
....AssemblyPartNumber (indexed uniquely)
....other non-key columns
The Customers entity type would be modelled by a table like this:
Customers
....CustomerID (primary key)
....CustomerName
....PartNumber (foreign key, indexed non-uniquely)
....other non-key columns
Note that the only column common to both tables is PartNumber.
A form for entering rows into the Customers table can be based on a query which joins the tables, e.g.
SELECT Customers.*,
Products.AssemblyPartNumber
FROM Customers INNER JOIN Products
ON Customers.PartNumber = Products.PartNumber;
Other non-key column from Products can be included if necessary. The control bound to the PartNumber column from Customers should be a combo box with a RowSource property of:
SELECT PartNumber FROM Products ORDER BY PartNumber;
Once a part number is selected in the combo box the AssemblyPartNumber control will be filled automatically. The Locked property of the AssemblyPartNumber control ( and controls bound to any other columns from Products) should be set to True (Yes) and its
Enabled property to False (No) to make it read only.
2. With a many-to-many relationship type on the other hand, the model is:
Products
....PartNumber (primary key)
....AssemblyPartNumber (indexed uniquely)
....other non-key columns
Customers
....CustomerID (primary key)
....CustomerName
....other non-key columns
And to model the relationship type:
CustomerProducts
....CustomerID (foreign key, indexed non-uniquely)
....PartNumber (foreign key, indexed non-uniquely)
The last table resolves the many to-many-relationship type into two one-to-many relationship types. It might have other columns modelling other attributes of the relationship type. The primary key of this table, assuming a customer can purchase the same product
only once is a composite one made up of both columns. If a customer can purchase the same product more than once the key would be extended to include another column, e.g. a DatePurchased column.
With this model a form based on Customers can be used, and within it a subform based on the following query:
SELECT CustomerProducts.*,
Products.AssemblyPartNumber
FROM CustomerProductsINNER JOIN Products
ON CustomerProducts.PartNumber = Products.PartNumber;
Again the control bound to the PartNumber column from Customers should be a combo box with a RowSource property as above. Similarly the AssemblyPartNumber control, and any controls bound to any other columns from Products, should be made read only by setting
their Locked and Enabled properties as described above.
As the many-to-many relationship type is symmetrical, the interface could equally well be a Products form with a CustomerProducts subform within it of course, so that one or more customers could be entered per product rather than one or more products per customer.
The subform's query would in this case join the CustomerProducts to Customers and return the non-key columns from the latter of course.
So far we've modelled the relationship between Customers and Products on the basis of your description and described the appropriate interfaces. Now we return to your original question, which presumably relates to the insertion of data via a form into some
other table which has a foreign key CustomerID column. Here we come full circle, as the only column needed in this other table is a CustomerID foreign key column, for which a combo box with a RowSource of:
SELECT Customers.CustomerID, Customers.CustomerName,
Customers.PartNumber, Products.AssemblyPartNumber
FROM Customers INNER JOIN Products
ON Customers.PartNumber = Products.PartNumber;
is needed. To show the PartNumber and AssemblyPartNumber values two unbound combo boxes are needed with ControlSource properties of:
=cboCustomer.Column(2)
and
=cboCustomer.Column(3)
where cboCustomer is the name of the combo box bound to the CustomerID column.
The above model preserves all the information content which you and your boss wish, but does so by means of a set of correctly normalized tables with no redundancy, and consequently no risk of update anomalies. The table and column names will differ from yours
and you will doubtless have other columns representing other attributes of the entity type involved, but the model per se tallies with the reality of the business model as you've described it.