Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SETFOCUS woes
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01167308
Message ID:
01167322
Views:
7
I will see if this can help me.

Thanks!

>In the lostfocus of your textbox use something like:
>
IF this.Value <> "1"  && Or whatever condition needs to be met
>  NODEFAULT  && This will prevent a tab to the next field
>ELSE
>  DODEFAULT()
>ENDIF
>
>
>>Hey Gang!
>>
>>Here is my problem for today!
>>
>>I have a Form that has a field in it. The Field has a VALID event in it. Ok.
>>
>>Now, in the code that does the validation, we have added a new Form to popup if certain conditions arise. In this form are some things you can chose and an OK button.
>>
>>When the user selects the OK button, the second form goes through some more code and is finally destroyed , THEN the code in the original form does a SETFOCUS to another field on the form.
>>
>>OH NO!!! Doesn't like that!!!
>>
>>I get a
>>"Cannot call SETFOCUS from withing a WHEN, VALID, RANGEHIGH or RANGELOW event" Error Message.
>>
>>Any workaround for this, other than DON'T DO THE SETFOCUS??
>>
>>Thanks!!
>>Tommy
Tommy Tillman A+ NetWork+ MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform