Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using return in the valid process
Message
From
10/11/2004 11:45:34
 
 
To
10/11/2004 11:33:35
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows '98
Miscellaneous
Thread ID:
00960046
Message ID:
00960053
Views:
9
Justin,

Setting the Close button Default property to .T. may do what you want.

HTHs,

>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?
Jim
Previous
Reply
Map
View

Click here to load this message in the networking platform