>I have a product code table that Im trying to build a form to add new product codes to. I have an index set up for unique product codes, the problem that Im running into is I have my form with a field for the product code and in the when method i have code that seeks the table to see if the code has already been used. when I run the form and try adding a new product code that I know is in the table, i get an error that tells me that the uniquness of the index has been violated. how to I capture this error before it happens?
>
>Thanks
>Ron
You could have an insert trigger which returns false if the product code is already in the table. Or your valid method could validate and refuse to add if the code is already there.