Fired when the data does not match the cell's validation pattern.
Parameters
Parameter | Description |
---|---|
Cell | The cell whose data is invalid |
Data | The invalid data |
Pattern | The cell's validation pattern |
Message | The cell's validation message |
Remarks
The OnInvalidData event fires when the user attempts to update a cell containing invalid data by navigating to another cell or leaving the table altogether. Data is considered invalid when the data in the cell does not match the validation pattern specified for that cell.
This event does not fire if 1) the cell has no validation pattern or 2) the developer specified that a validation message appear automatically.
Whenever the event does not fire, then the process continues to the BeforeUpdate event. If the event does fire, however, processing will only continue to the BeforeUpdate event if the Cancel property is 0. Set the Cancel property to 1 or 2 during this event if you want to halt the update event chain completely.
The parameters are all provided for convenience. In particular, you may find the Message parameter useful if you want to manually display your own popups while conveniently storing cell-specific messages in the table itself (to avoid the use of case statements, for example).