CANCEL

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2003 (Modified)


CANCEL

ParameterTypeDescription
This command does not require any parameters

Description

The CANCEL command is used in form or object methods (or in a subroutine) to:

cancel a new or modified record or subrecord, for which data entry has been initiated using ADD RECORD, MODIFY RECORD, ADD SUBRECORD, or MODIFY SUBRECORD.

cancel a form displayed with the DIALOG command.

exit a form displaying a selection of records, using DISPLAY SELECTION or MODIFY SELECTION.

cancel the printing of a form that is about to be printed using the Print form command (see below).

In the context of data entry, CANCEL performs the same action as if the user had pressed the cancel key (Esc).

CANCEL is commonly executed as a result of a menu command being chosen. CANCEL is also commonly used in the object method of a "no action" button.

It is also often used in the optional close box method for the Open window command. If there is a Control-menu box on a window, ACCEPT or CANCEL can be called, in the method to be executed, when the Control-menu box is double-clicked or the Close menu command is chosen.

CANCEL cannot be queued up. Executing two CANCEL commands in a row from within a method in response to an event would have the same effect as executing only one.

Finally, this command can be used in the On Printing Detail form event, when using the Print form command. In this context, the CANCEL command suspends the printing of the form that is about to be printed, then resumes it on the next page. This mechanism can be used to manage form printing when there is a lack of space or if a page break is required.

Note: This operation differs from that of the PAGE BREAK(*) command that cancels ALL the forms waiting to be printed.

Example

Refer to the example of the SET PRINT MARKER.

See Also

ACCEPT, PAGE BREAK, Print form.

System Variables and Sets

When the CANCEL command is executed (form or printing cancelled), the system variable OK is set to 0.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next