Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return .f. in valid event
Message
From
03/08/1999 08:29:45
 
 
To
03/08/1999 00:33:18
Amit Abhangrao
Charmi Software Exports
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00249103
Message ID:
00249159
Views:
18
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform