Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add/Edit Records - conflicts with candidate index
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00679934
Message ID:
00679937
Views:
18
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform