Megin
asked on
Quick Access Question about Primary/Composit Keys
I have a table in access and I need to prevent duplicates when two of the fields are duplicated.
So, if just one of them is repeated it is fine. The problem is when a combination of fields are duplicated. Example:
Fields: Lname, Fname, DOB
It is okay if any of those are duplicated on their own. But if Lname and Fname, or Lname and DOB match another record in the table, the table should reject the new record.
So, if just one of them is repeated it is fine. The problem is when a combination of fields are duplicated. Example:
Fields: Lname, Fname, DOB
It is okay if any of those are duplicated on their own. But if Lname and Fname, or Lname and DOB match another record in the table, the table should reject the new record.
Are you wondering how to do that, or if you can have both with the same field (Lname)? Or have two composite keys, with no duplicates?
ASKER
I am wondering how to do that with Access. I see that I can set a particular field to not accept duplicates and I could set others to not accept duplicates, but I want to make it so that the combination of two fields won't accept duplicates.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect! Thank you!
I would not have found that on my own.
I would not have found that on my own.