Query to eliminate duplicates

L

Lucas

I'm having a minor problem between two employees creating
different records for the same referral. I'd like to put
a VBA script into a fields' afterupdate event where it
will check the name entered against other records. If
there is an exact match of that field, then a message
will pop up saying, "A record already exists for So-And-
So. Would you like to continue with this entry or go to
the previous entry?"

Continue
Go to previous entry

If they click continue, the window closes. If they
choose to go to the previous entry, clicking the button
takes them to that record.

Is there an easy way to do this?

Thanks much,

Lucas

PS: The holy grail for this type of action would be if
that referral turns into a customer, and the Customer
form had a script that could query the Referral table,
then say, "A person matching this name was found listed
as a Referral, would you like to transfer over available
information?"

Yes
No

If yes, then field "Name" "Title" "Address", etc copy
to "Name" "Title" "Address"...

If no, close form.

Now that would make me drool...
 
G

GVaught

You would be better off giving them a drop down box listing the existing
names, which is also set to restrict from the List only. Then if the name is
not in that listing they can add the name via an Event procedure called Not
In List.
 

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