Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SETFOCUS in
Message
 
To
04/10/2003 12:12:42
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00835117
Message ID:
00835259
Views:
11
>Returning a numeric value in the VALID() won't work , because the SETFOCUS() occurs "off" the main form, so there is no taborder to reference.
>
>Doing the validation in the LOSTFOCUS() won't work because I can't set focus to the same control after the subform is finished, and that control has already lost focus. So, if the value in the main form control is not correct after the subform executes, there is no way (that I can see) to validate.
>

Another way would be to remember which control had focus last time (you can set some form property to remember it in control's LostFocus() method) and (conditionally) return to that control when your main form activates agan after closing the subform.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform