>I have a form which set the keyPreview to .T.
>
>But how can I know that where the user press the key? eg. if at text1, do nothing, if from grid1, then go to top...
>
>TIA.
try putting this code into From KeyPress Event
LPARAMETERS nKeyCode, nShiftAltCtrl
LOCAL MyPrueba
MyPrueba = thisform.ActiveControl.name
WAIT MyPrueba WINDOW
José Luis.
Quidquid latine dictum sit, altum sonatur