FUNCTION UpdateTable LPARAMETER tcalias, tlforce LOCAL llSuccess IF EMPTY(tcAlias) tcAlias = ALIAS() ENDIF IF CURSORGETPROP("Buffering", tcAlias) > 1 && Does the table or view have buffering enabled? llSuccess = TABLEUPDATE(.T.,tlForce, tcAlias) IF llSuccess RETURN .T. ELSE THISFORM.HandleError(tcAlias) RETURN .F. ENDIF ENDIF ENDFUNC FUNCTION HandleError LPARAMETERS tcalias * This method is called by THIS.UpdateTable() when a tableupdate fails. It gives the user a message and then reverts the changes. AERROR(errorarray) MESSAGEBOX('Changes to table "' + ALLTRIM(tcalias) + '" could not be saved. The following reason was returned: '+ CHR(13) +; CHR(13) + (errorarray[2]) + CHR(13) + CHR(13) + "Any changes you have made will be lost.", 48,"Update Error") TABLEREVERT(.T., tcalias) ENDFUNC