Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using return in the valid process
Message
From
10/11/2004 12:05:56
 
 
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:
00960071
Views:
10
If not valid then don't return anything (but flag up a message box or something so they know they're being naughty)
     IF This.Value $ "NY"
	 RETURN .T.
     ELSE
          Wait window "Who's been a naughty user then?" noclear
	 THIS.Value = ""
     ENDIF
Incidentally, I always thought that valid had to return .T. or .F., or a number, but not either???

>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?

Couldn't this go in the textbox's valid as well, with the same criteria?

HTH

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform