SOLVED

Access and two columns in a table

Copper Contributor

Hi, first I apologize for the mistakes, English is not my main language. I'm new to Access. I have two columns in a table (Access) (records can repeat in each of them), but I would like the combination of their two contents to be unique. For example, I have first names in one column and last names in the other. The first column may contain the same first names and the second the same last names, but the combination of the first name in one column and the combination of the last name in the other is to be unique for the entire table. How can this be done?

1 Reply
best response confirmed by GIal97 (Copper Contributor)
Solution

Create a unique index on both fields. That will do exactly what you want.
However you may want to consider how you will manage a situation where two people have exactly the same last name & first name. Possibly you should add date of birth to the index fields

1 best response

Accepted Solutions
best response confirmed by GIal97 (Copper Contributor)
Solution

Create a unique index on both fields. That will do exactly what you want.
However you may want to consider how you will manage a situation where two people have exactly the same last name & first name. Possibly you should add date of birth to the index fields

View solution in original post