>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