Prevent Duplicates

  • Thread starter Thread starter scottnshelly
  • Start date Start date
S

scottnshelly

I have a userform that have three textboxes. the user puts a firs
name, last name and ID number in these. when they hit the "Add
button, it adds those boxes on the first empty row. How can i mak
sure that there isn't already a row for that agent and if there is
make the changes specified on the userform.
Not sure if this question will make sense to anyone else - it make
sense to me. i can clarify if needed.
Thanks
 
Have a look at the advanced filter function, copy to a new location.
You have a unique records only checkbox

jason
 
You'll need to define what is meant by a duplicate - all fields identical or
something else eg ID numbers only - there are people with the same names!
In any event if you wish to check before the form entries populate the
worksheet, then you'll need to scan the database range testing the fields
(field) for matches, when a match is found flag to user via a control
message (label) on the userform, enable a reset option and await the users
repsonse otherwise add to the range.
Confirm what you mean by dupe and we can provide the code for the scan.

Cheers
Nigel
 
sorry for the late response, i have been on vacation.
I would like to prevent a user from adding a duplicate ID number.
want to have first name in column A, last name in column B and ID i
column C. if the user is trying to add an ID that already exists,
want it to prevent them from adding it again, but allow them to change
i can make a userform to change the information, but i need to kno
how to prevent the duplicate ID and prompt for the change instead.
thank
 

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

Back
Top