Valid Event
Applies To See Also
Occurs before a control loses the focus.
Syntax
PROCEDURE Control.Valid
[LPARAMETERS nIndex]
Parameters
nIndex
Uniquely identifies a control if it is in a control array.
Remarks
If the Valid event returns true (.T.), the control loses focus. If the Valid event returns false (.F.), the control does not lose focus.
The Valid event can also return a numeric value. Returning a numeric value has one of three effects:
- If 0 is returned, the control does not lose focus.
- If a positive value is returned, the value specifies the number of controls the focus advances. For example, if the Valid event returns 1, the next control gets the focus.
- If a negative value is returned, the value specifies the number of controls the focus moves back. For example, if the Valid event returns –1, the previous control gets the focus.