>Hi,
>
>I have several free tables that I wish to edit via frmDEGridNav2Pages.
>
>Is there any behavior built into this class that enforces the uniqueness of an entered index ? I mean truly unique, same as a primary key, but not using a DBC.
>
>TIA,
>
>Alex
Alex,
As Ed said, you could use a Candidate key to enforce this with VFP but this generates a nasty error 1884 (Uniqueness of index "indexname" is violated) if you violate it. You can avoid this by using either of the following VMP tools:
1. Use an instance of CusCKCheck in XXFWCTRL.VCX (Candidate Key check) in conjunction with a textbox or spinner. See the zRreadMe for notes on how to implement it.
2. In the ActionOnValid of your data entry controls, add code to call X3CKCHEK with the necessary parameters. This will return a logical value based on whether value exists in the table. The CusCKCheck class is actually a wrapper to this utility but it is a little easier to use because of the visual aspect of setting properties in the property sheet.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao