Full Version: duplicate products in sample database
UtterAccess Forums > Microsoft® Access > Access Forms
littleneo
Hi,
I am reviewing the sample database Northwind with Access, and get a question.
Otried to enter a new product from the entry form "Products", and found I could enter duplicate product without any warning.
For example, the product "Tofu", supplier "Mayumi's", category "Produce", QuantityPerUnit "40 - 100 g pkgs"...., I don''t know how to define a unique product in this sample. But I think if you have same product name, same supplier, same category, same quantity per unit, it is likely the same product, should only have one ProductID (PK in the table Products). But here I can have four exactly same Tofu with 4 different ProductID. Is it right? Have you met similar situation? How do you guys solve the problem?
Thanks and I greatly appreciate your explanation!
Larry Larsen
Hi
Yes.. in the NW example your able to create a product with identical details except the (pk) as each new product get a new id..
You could set the Index at table level for the product name to except (No duplicates".. option..!!
thumbup.gif
littleneo
Thank you!
If product name can not identify a product uniquely, (I think that is why we need a productID as PK), for example, product name + supplier + category need to be combined to identify a product, can we do that by setting index no duplicate on multiple fields in one table?
By the way, I tried to change product as index no duplicate, it was OK. But when I tried to add supplierID as index no duplicate at the same time, it showed failed.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.