thank you very much
>>I tried it but i get the same value eather for ENTER or mouse click,or better when I click the mouse it acts like if i hit the enter key...
>>... anyway i'm a step beyond :-)
>
>You can test the active control in KeyPress with KeyPreview = .T.
>
>
>IF nKeyCode = 13
> IF TYPE('thisform.ActiveControl') = 'O'
> IF thisform.ActiveControl.Name = '{grid}'
> thisform.{pageframe}.{page}.SetFocus
>
> ENDIF
> ENDIF
>ENDIF
>