PDA

View Full Version : Preventing duplicate entries into an access db


jatherton
07-18-2002, 08:29 PM
What is the best method for handling the prevention of users entering duplicate information into an access database. For instance I am attempting to prevent someone from duplicating an email address when they register for membership.

Hatch
07-18-2002, 08:50 PM
My quess would check the database and match it with the submitted email address.

ReyN
07-19-2002, 03:00 PM
You can set that up at the database level, by setting a single-field primary key. This prohibits duplicate values in that field.

You have to provide code, though, to trap and handle the error at run time, in case an attempt to insert a duplicate entry is detected.