>I am using a grid for data entry. Every control on the grid is marked ReadOnly = .T., TabStop = .F. except for the one I want the user to utilize. > >I want / to move the user to the next record; -- moves back one record. I have the following code in the KeyPress event: > >IF nKeyCode = 13 .OR. nKeyCode = 9 > THIS.LostFocus() && Calc. & display the premium > SKIP > IF EOF() > WAIT WINDOW AT 20,20 "Last advice on file for target date." > SKIP -1 > ENDIF > This.SetFocus() >ENDIF >IF nKeyCode = 15 && Shift--tab > THIS.LostFocus() > SKIP -1 IN Transact > IF BOF() > WAIT WINDOW AT 20,20 "First advice on file for target date." > ENDIF > THIS.SetFocus() >ENDIF > >Doesn't work. All it does is wipe out the user's input and shift focus to the next column to the right. If I press the , everything works beautifully. What have I done wrong in my code? How can I make and emulate the key? John,
I implemented this by Setting Enabled = .F. in the other columns (along with the TabStop = .f.