>>Cetin, I've just been having another look at this:
>>
>>It seems if I issue a NODefault in the GotFocus event, without a Setfocus, focus goes to the FIRST object in the Tab Order on the screen.
>>What I want to do is go to the NEXT object in the Tabindex, but without having to do an explicit MyObject.setfocus. i.e I always want it to go to whatever is the next object in the tabindex:
>
>
>I guess I'm missing something obvious here, but doesn't returning false in the When event have the required effect. In your original code the .F. was missing from the return, so it would return .T. by default
>
>
>When Event:
>Cmd1
>Cmd2
>cmd3
>If !MyTest1
> return .F.
>Endif
>If !Mytest2
> Return .F.
>Endif
>
Len,
You're not missing anything and you're right. The code is as clear as yours or a shortened version :
Cmd1
Cmd2
cmd3
return (MyTest1 and MyTest2)
Original message misguided me myNextField might be any 'desired' next not actual :)
Cetin