You can use the DLookup function in the BeforeUpdate event of each control
to check for a duplicate. In real life however, many duplicates are allowed.
A husband and wife will have the same address and phone number, and usually
the same last name. Likewise a father and son can have the same name with a
different suffix. There are also many duplicates of common names like "John
Smith"
The better course of action is to identify several fields which, when
combined, are unique. Then create a compound index and them and require it
to be unique. To do that, open the Index dialog in the table's design view,
give the index a name and add up to 10 fields. Make the index unique and
save the table.
--
Arvin Meyer, MCP, MVP
Free MS-Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com