Can access to warn if a duplicate address is entered

  • Thread starter Thread starter ivan harvey
  • Start date Start date
I

ivan harvey

Access 2007, In my customers database when i put in a potential new customer
i would like to be warned if the address or phone number already exists in
the database?
 
Yup. Several different ways.

Personally, it sounds like you should code-up a DLookup command behind the
form in VBA. You can use that to check on each of as many different
(potentially duplicate) fields as you want. Then you can warn the user via a
MSGBOX, UNDO the add, or both.
 
You can set those fields to allow unique values only. But then you would be
able to enter a duplicate value.
 
Access 2007, In my customers database when i put in a potential new customer
i would like to be warned if the address or phone number already exists in
the database?

As noted elsethread, yes you can do this... but be careful. Address are
notoriously difficult to "deduplicate". Not only might several customers live
at the same address (a boarding house, a fraternity, etc.); it can also be
quite tricky to identify two addresses as "the same" or "different". Is "312
Main St." the same as "312 Main" or "312 Main Street"? Yes, according to a
human; absolutely not, according to your literal-minded computer. Is "312 E.
Oak Ave." the same as "312 Oak Ave." - or might the latter be on West Oak?

This problem pretty much always requires a USB (Using Someone's Brain)
interface.

John W. Vinson [MVP]
 
Back
Top