# Assign default values within a form for new records based on a field in the new record and matching fields in existing records



## EdP68 (Dec 2, 2022)

I have a database I am developing that contains a table of products. These products are from multiple manufactures (captured in the table as "Manufacturer"). In addition to the product "Model Number" there is a "Product Line" field and several product characteristics, such as "Construction Method", "Material", and "Base Type". When a new product is added with a "Product Line" with existing matching records, I want to add the fields that match 100% of the time. If product line X has records with two different bases, that field would be left blank while "Construction Method" and Material" that are always 'Glued' and 'Oak' respectively are populated because they are consistent among all existing record for "Product Line" X.

Any assistance is greatly appreciated.


----------



## jackd (Dec 2, 2022)

Can you post a copy of your tables and relationships? -- expand tables to show all fields if possible.
Who determines ProductLine? Do you have a list of Product Lines to show us the "kind of data" involved?


----------



## Micron (Dec 2, 2022)

I'd agree with that suggestion because this seems wrong


EdP68 said:


> If product line X has records with two different bases


Sounds like you should have one record for Product X and a junction table for the combinations of Base Type.


----------

