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!

duplicated records

Status
Not open for further replies.

LimonaM

Programmer
Oct 27, 2004
50
SI
Need some help with records

There are 2 blocks in my form.
In first there are all records i have. In the second are records which i can add to first block.

Some records which i want to add are already in the first block.
How can i, when i want to add some record which already exist, display a message, that this record already exist - but when message appears i can go on with adding records.

My problem is now when i have duplicate records an error appears and i can't add other records so i must close my form. I want that message apears , nothing happens and user chooses other record to add.
 
It seems to me that you insert a record to a table. In this case you can use a Pre-Insert trigger of the second block. In this trigger you can test if the record exists in the table and if yes then you will display an alert with a message and use RAISE Form_Trigger_Failure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top