How do I prevent duplicates using multiple fields in Access?

P

pklos

Individuals can be members of the same family, but don't want to enter same
individual twice, so I tried:
Field [Unique] = [LastName] & [FirstName]
Indexed is set to "Yes (No Duplicates)"
I noticed that it updates the field in the form, but not in the table. Is
that the problem? How do I get the table to update?
What am I missing?
 
R

Rick B

You don't. That would be redundant to store it in the table.

Instead, create a compound index in your table.

Open your table in design-view and select VIEW/INDEXES
Give it a name like "FullName".
In the Field, select your FirstName field.
On the next line, leave the IndexName blank and select your LastName field.
Set the UNIQUE property to Yes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top