Xbasic

OBJECT.CANCEL Function

Syntax

.Cancel([L warn])

Arguments

warn

Optional. Default = .F. (FALSE)

.F. = Discards changes without a warning message.
.T. = Displays a warning message before discarding changes.

Description

Cancels changes to the current record.

Discussion

The <OBJECT>.CANCEL() method applies to:

Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)

The <OBJECT>.CANCEL() method cancels any changes made to the current record before the record is saved.

Example

This script cancels changes in the Sales form:

:Sales.cancel()

Limitations

Desktop applications only.

See Also