Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DUPLICATE RECORD QUESTION 1

Status
Not open for further replies.

HerickP

IS-IT--Management
May 10, 2000
68
US
Hi,<br><br>I have a form that I use for record entering...I have force the fields in the table not to accept duplicate records if entered. Is there a way I can have a customized meg box to popup when the user enters a duplicate record and hits the command button that will enter the record??? Thanks
 
This has come up quite a bit recently. Preventing duplicate values in tables can be accomplished in a couple of ways. The most dependable way is to set the value of 'Indexed' for the unique index in your table to 'No Duplicates'. Once done the table will never contain duplicate values for index(field) selected.<br><br>With no further adjustments, when users enter duplicate values in this field. Access will pop-up and (internal) Error Message.<br><br>What most applications call for in this situation are customized instructions to the user on how to proceed. Further, business rules may dictate rather than leaving the next steps in the users hands.<br><br>There is a 'Form_Error(dataErr as Integer, Response as Integer)' Event that can be used to customize your messages (and responses) in situations where duplicate values have caused an error generated by Access. <br><br>Take a look at the MS Access help information on this.<br><br> <p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top