>Hi,
>
>I have A form where all the controls are bound to a table. Field1 in my table has a candidate index defined on it. How do I allow users to add/edit records and make sure that field1 is not duplicated. I tried to trap the error number '1884', but it did not work.
>
>Any help will be appreciated.
>
>Ria
Ria,
One option would be to check for the existence of that Key before you allow the save. You could do something like
select Field1 from MyTable where Field1==Control1.Value into cursor Dups
Then check if anything was returned.
HTH
Caroline