In addition to using EEPs to verify values for form controls, there is a simple method to check if a field has a value (not empty), and display a message if the required value is not present. In the Form Designer, and Upon the right click popup menu options for a form control, there are "required value" options that may be defined for database and variable controls. When enabled, a value for the field is checked when the form is closed.
•Check Required Value on Form Close - specifies the control is checked if it has a value in the form's "On Close" event
•Required Value Error Message... - specifies the displayed message if "Check Required Value on Form Close" is checked/true, and a value is not entered/specified for the control.
In the event that the field is left empty, and the form is closed, the defined error message will appear:
The following PROPERTY command and parameters may also be used within forms.
PROPERTY <Component ID> REQUIREVALUEONFORMCLOSE 'TRUE'
PROPERTY <Component ID> VALUEISREQUIREDMESSAGE 'Value'
If the required value is intended to be a warning, and also for easier development of several fields within a form, an application property was introduced.
PROPERTY APPLICATION STRICT_VALUE_REQUIREMENTS ON
The default value is ON. When ON, the error dialog displayed.
When OFF, a warning dialog, with an "Ignore" button, is displayed.
The properties are available in following Database Controls: DB Edit, DB Memo, DB Lookup Combo Box, DB Lookup List Box, DB User Defined Combo Box, DB User Defined List Box, DB Lookup List View, and DB Unicode Memo
The properties are available in following Variable Controls: Variable Edit, Variable Memo, Variable Lookup Combo Box, Variable Lookup List Box, Variable Radio Button Group, Variable User Defined Combo Box, Variable User Defined List Box, Variable Lookup List View, and Variable Unicode Memo.