Cancel Property
Applies To: Button
Description
This property determines which (if any) Push button in a Form or SubForm is to be associated with the Escape key. It has the value 1 or 0.
Pressing the Escape key will generate a Select event on the Button whose Cancel property is 1, regardless of which object has the keyboard focus.
As only one button in a Form or SubForm can be the Cancel button, setting Cancel to 1 for a particular button automatically sets Cancel to 0 for all others in the same Form.