SELE childfile SET ORDER TO TAG lastname SELE parentfile SET RELATION TO lastname INTO childfile *The below code is in the keypress of the last control in the child grid PROCEDURE text1.KeyPress LPARAMETERS nKeyCode, nShiftAltCtrl IF (NKEYCODE=13) NODEFAULT SELE childfile SKIP IF EOF('childfile') .or. childfile.lastname <> parentfile.lastname APPEND BLANK REPLACE childfile.lastname WITH parentfile.lastname ENDIF KEYBOARD '{TAB}' KEYBOARD '{DNARROW}' ENDIF ENDPROC>eof() will not work because the table is in a relation with the parent table so it is not showing all records. The bottom grid row is not the last record in the table.