IF TableUpdate( 0, .F., "<AliasName>") * Update failed THIS.cmdRevert.Click() ENDIFFor each alias that is open. IN the revert button's click;
TableRevert(.T.,"<The alias name>") ... <PRE> For each alias in the form. You make this more generic with the buttons by using a form class that has DoSave and DoRevert methods. Thennyou write the code in the form's methods and call those from the buttons. In this case the Save button's click becomes; <PRE> IF NOT THISFORM.DoSave() THISFORM.DoRevert() ENDIF