duplicate table values

  • Thread starter Thread starter mkarmali
  • Start date Start date
M

mkarmali

Hello:
I have created an employee table with a primary key: employee_number.
I also have two fields: Last_name and First_name.
How can I avoid allowing people who enter data into the table to enter a
person twice? i.e. the database will allow me to add a person (same first and
last name) repeatedly as long as the key is different.
Thank you.
 
I hope that you have something else addition to the name fields to identify
your person, perhaps an email address, a date of birth or a number field so
that you can have John Smith 1, John Smith 2.

To create a Unique Index

In table Design View, click the Index button.
Type MyIndex in the first column. In the second column choose LastName
Type nothing into the first column on the next row but choose FirstName
Again, type nothing into the first column of the next row but choose any
other field you want for your index.

Click back on the first row of your index and in the first column.
Under the index list, next to where it says Unique, choose Yes

Evi
 
Thank you very much Evi. I much needed the detailed way you conveyed how to
create an index when you have two or more fields.
 
Back
Top