Article ID: 138559
Article Last Modified on 11/17/2003
GO BOTTOM ThisForm.nLastRec = RECNO() GO TOP
LPARAMETERS nColIndex && This line is added automatically by FoxPro
&& nColIndex is current column the cursor is in
IF nColIndex = This.ColumnCount AND RECNO() = ThisForm.nLastRec ;
AND LASTKEY() = 9
APPEND BLANK
ThisForm.nLastRec = RECNO()
This.SetFocus
ENDIF
This code appends a record only if you press the TAB key to move through
the fields. Code would have to be added for conditionally appending
records based on different navigation through the fields.
IF "3"$GETFLDSTATE(-1)
This.ActivateCell(This.ActiveRow, nColIndex)
ENDIF
IF <condition to save>
=TableUpdate(.T.)
ELSE
=TableRevert(.T.)
ENDIF
Additional query words: VFoxMac VFoxWin
Keywords: kbcode KB138559