>>>I've got the tablerevert working ok on a form whereas all changes to a record are undone upon 'Abort' but how do I undo an 'Append blank' if the user chooses to 'Abort' halfway thru?
>>You can use record valid and if on a grid you can control it before trigger in beforerowcolchange.
>
>Cetin, could you be more specific?
I had already answered about an hour ago but I couldn't see it. Sorry if a duplication.
Without transaction (begin transaction...rollback...commit...end transaction) :
- Buffering set to row ;
append blank
... && Edits to appended record without rec pointer moving
tablerevert() && Reverts appending
- Buffering set to table ;
append blank
... && Edits to appended record
.... && Rec pointer moves (also might be another append, insert into etc)
*tablerevert() && Reverts current rec
tablerevert(.t.) && Reverts all up to last update
-If you use form wizard navigation buttons a user has opportunity to append a blank rec with only Add button and then s/he either has the chance to Save or Revert (reverts append blank).
-If you use a grid than you can control a record before table's record valid fires via BeforeRowColChange.
-Getfldstate(-1) gives info about record edition-deletion status.
-Using transaction you can control all better.
Cetin