Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using return in the valid process
Message
De
10/11/2004 11:33:35
Justin Roper
The Cadle Company
Ohio, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Using return in the valid process
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows '98
Divers
Thread ID:
00960046
Message ID:
00960046
Vues:
42
I have a few different forms that have one character fields and I want the user to only have a few choices of forms to choose from. For example a Yes and No I put the following code in the Valid
IF This.Value $ "NY"
RETURN .T.
ELSE
THIS.Value = ""
RETURN 0
ENDIF
This just says if they don't enter a Y or N don't let them leave until they do. This works fine most of the time but sometimes the user just wants to exit the form all together and it won't let them do that until they enter a valid value in . Is there a way I can tell when they are trying to press the close button and to let them without having them enter a valid value into that textbox first?

Another problem I run into is on a textbox LostFocus I sometimes check to see if a value they entered exists in a table and I require them to put a value in that field. However, if they need to leave the form by pressing an exit button it still pops up the message. I would like it if they press the exit button that message won't come up. Can anyone help?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform