>>How do I send the FOCUS back to a field from a VALID?
>Robert,
>
>You can only keep focus in a particular field with the VALID. If VALID returns .F., the error message is displayed and focus stays in that control. If the VALID returns 0, focus stays in the contorl but no error message is displayed.
>
>To SetFocus to a certain place on leaving a control, you can do that in the control's LostFocus event by simply;
>
> THISFORM.Control.SetFocus()
Jim, as matter of understanding this logic (from a VFP newbie), I have to ask: how does any other control ever gain the focus if this control always grabs back the focus in its "LostFocus" event?
I can only visualize that clicking on any other control would make this control "lose focus", and then the "lost focus" method would "SetFocus" immediately back to this control....
This is the type of code I see that makes me wonder, how does a "never-ending loop" be avoided? Not that this is a wrong suggestion, just that I would like to understand the workings of VFP better...
Thanks, Tom Hayward
Tom Hayward, Visual FoxPro Programmer and Tutor