Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field validation and duplicate entries
Message
De
27/01/2006 14:27:25
 
 
À
27/01/2006 14:23:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01090901
Message ID:
01091073
Vues:
15
>>Put a command to check the cust_no in the database on lost focus event of the control and prompt a message if not unique.
>
>Thanks Marc. I tried that with the following code in the Lost Focus event:
>
>seek this.value
>if foun()
> retu .f.
>else
> retu .t.
>endi
>
>And I entered a cust_no that's already in use and got the same message: "Uniquness of index CUST_NO is violated."
>
>This really oughta be simple. In fact, I'm sure it IS for all of you. :) I just don't know what I'm not seeing here...

Not a fix to your problem, but your six lines can be replaced by one:
Return Seek(this.value)
It may be even faster to use IndexSeek
Return IndexSeek(this.value,.F.)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform