IF INLIST( nKeyCode, 13, 9 ) IF INLIST( GETFLDSTATE( JustExt( This.ControlSource ), JustStem( This.ControlSource ) ), 2, 3 ) SKIP IN ( .RecordSOurce ) IF EOF() SKIP -1 IN ( .RecordSOurce ) *** Set focus to somewhere outside the grid here Thisform.SomeObject.SetFocus() ELSE This.Parent.Column1.SetFocus() ENDIF NODEFAULT ENDIF ENDIFThis is just off the top of my head and untestes, so you will probably have to modify the code, but I think you get the general idea.