Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return .f. in valid event
Message
De
03/08/1999 08:29:45
 
 
À
03/08/1999 00:33:18
Amit Abhangrao
Charmi Software Exports
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00249103
Message ID:
00249159
Vues:
23
>Hi all,
>
> I have a textbox in my form, and i have written validations on that, but i want if it returns false value, it should remain in that field only. But if i do it in valid event, it does not allow me to do anything, i must write valid value in that. i cannot press cancel button also, or i cannot open another form for master entry etc.
>
> If i written code like if value is false then 'this.setfocus()' But it doesnot sets the focus to the same field
>
>PLEASE HELP
>
>TIA
>Amit

If your cancel button has it's cancel property set to .T., then it also set LASTKEY() to 27 when it is clicked. This menas you can code your valid event like:

IF LASTKEY() <> 27 AND (SomeCondition)
RETURN .F.
ENDIF
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform