Combo Box Control Design-Time Considerations

The combo box control has no unique property settings. Among the more standard property settings, the Required Field flag deserves mention in relationship to the combo box control. Recall that when initialized, the control simply displays the user prompt, -- Select One --. If the Required Field flag is enabled and this prompt is displayed during validation, the engine throws an error and prevents the user from continuing until he or she selects an item from the list. On the other hand, if the flag is disabled under the same circumstance, the engine will actually write a blank (that is, key = ) to the database if the -- Select One -- prompt is still selected at the time the OK or Save button is clicked. The blank is written to the database in this case because the system cannot save an empty string () as a value for a key.

A second consideration when using the Required Field flag with combo boxes is that, if the required field indicator should be displayed in the application, you must check the Required Field property for the combo box and then connect static text to it. Be sure to size the connected static text box appropriately to allow for the "required" indicator to be appended to the end of the text, and also to allow for translations. If you do not connect static text to the combo box, runtime does not display the required field indicator in the application.

To connect static text to the combo box, select the combo box and the label. Then select Edit, Reconnect. To disconnect the static text from the combo box, select them and then select Edit, Disconnect.