>Hello guys, I know that in 5.0 I can not call SetFocus
>from within a "When","Valid" or some other methods, but
>I am calling setfocus from the click event of a button
>and I am having the same error:
>"SetFocus can not be called from When,Valid..."
>Is there any other condition that I am missing ?
Luis,
I just created a from and put a textbox and command button in it. In the button's click I wrote, THISFORM.Text1.SetFocus() and when I ran the form and clicked the button focus went to the textbox with no errors.
I am using VFP 5.0a.