Controls have a varying number of triggers depending on the type of control. Static controls and container controls have no triggers, while text boxes have a full range of triggers. Other data controls and data container controls have a subset of the possible triggers. Controls that can be clicked such as command buttons, menu items, and check boxes have a special trigger.
C/SIDE Control Triggers
The following table outlines the full range of triggers. The rightmost column indicates the controls that the trigger applies to.
Control trigger | Executed | Controls |
---|---|---|
The control is activated. |
Command button Menu button Check box Option button Text box Picture box Indicator Subform |
|
The control is deactivated |
Command button Menu button Check box Option button Text box Picture box Indicator Subform |
|
The control is about to be updated. |
Text box |
|
The control is selected for input and before any input is entered. |
Text box |
|
The user is entering data. This trigger is repeatedly executed, after each keystroke. |
Text box |
|
The user finishes input. |
Text box |
|
The control is pushed. |
Command button Check box Option button Picture box Indicator Menu item |
|
The control loses focus. |
Check box Option button Text box Picture box Indicator |
|
The value entered has been validated. |
Check box Option button Text box Picture box Indicator |
|
The user requests a lookup (by clicking a lookup button or by pressing F6). |
Text box |
|
The user requests a drill-down (by clicking a drill-down button or by pressing SHIFT+F6). |
Text box |
|
The user requests assist-edit (by clicking an assistedit button or by pressing_SHIFT+F2). |
Text box |
|
The control is activated. |
Command button Menu button Check box Option button Text box Picture box Indicator Subform |
|
The control is deactivated |
Command button Menu button Check box Option button Text box Picture box Indicator Subform |
|
The control is about to be updated. |
Text box |
|
The control is selected for input and before any input is entered. |
Text box |
|
The user is entering data. This trigger is repeatedly executed, after each keystroke. |
Text box |
OnValidate is also a field trigger at the table level. If both the field and control triggers are defined, the OnValidate (Fields) Trigger is executed before the OnValidate (Controls) Trigger (including the system default validation).
OnLookup is also a field trigger at the table level. The flow is different for this trigger. When a lookup is requested, OnLookup (Controls) Trigger is executed if it is defined in the field lookup or system default. If no control lookup trigger is defined, OnLookup (Fields) Trigger (if defined) replaces the system default lookup function.