Preventing duplicate entries using more than one field

  • Thread starter Thread starter madferet
  • Start date Start date
M

madferet

Guest
I am using a mailing list created with access and want prevent the addition of a duplicate name. The problem is there is a separate field for the first and last name. How can I prevent a duplicate entry both in the first and last name fields of one full entry?
 
madferet
You will have to concactenate the two values on your form, fill a recordset with concatenated values that are already in the table, and run a loop to compare. I would say this should be done on the BeforeUpdate of both the first name and last name fields with the condition that nethier is null.
Chris
 
You could define a unique index that includes both LastName and FirstName. However, even with a small population you could run into two people with the same name. It would be better to also include the address fields in the unique index.
 
To Pat Hartman if it is possible.
I went through several posts and finally I found something that will need my needs.
This post shows my problem but since I am not good in procedure writing I ask you if it is possible to send me an example of this solution or direct me to the right place where I can find it.
I have a table with Name, Middle Name and Last Name in different fields and I would like to have a code in another field, for example, BirthDate, that could verify the table and show me a dialogbox, before update that a person with those info is already in the table. Tks very much,
if you could reply by e-mail: neideb@gbl.com.br
 

Users who are viewing this thread

Back
Top Bottom