Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SETFOCUS woes
Message
From
06/11/2006 10:53:05
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01167308
Message ID:
01167317
Views:
8
Hi Tommy,

try calling your other form in the LostFocus() rather than the valid(). SO use the Valid to test if the entry is valid, maybe set a property of the object to indicate you want your form displayed, then in the lostfocus() check this property an ddisplay the form if desired.

>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
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform