The State field on the Employee Basic Data form (shown below) in the Sample Application illustrates Picklist Help for a state code field placed on a form with a combobox control based on the VPME Combobox_ control class. The State field also illustrates displaying a descriptive field from a Picklist table in lieu of the actual code field that’s being edited.
The state code field (STATE) in the DVSAEMAS.DBF table in the VPM Enterprise Sample Application uses Referential validation. The Picklist table is a table (DVSACST.DBF in the COMPANY database) of valid state codes and state names.
In the Sample Application, state codes are two character codes. The state name displayed in the State combo box is the state name, or code description, contained in a field in the state code table record for state code “FL”. We were able to display the state name instead of the state code itself by simply setting several properties of the state code combobox control when we created the Employee Basic Data form. We’ll teach you to do that later in this chapter.
State codes can be entered and changed on the Employee Basic Data form by selecting a state name in the State combo box. You can do an incremental search on the first field in the combo box list, which in this case is the state name field.
Alternatively, when the State field is selected and you either (a) press F2 or (b) right-click the field and select Picklist from the shortcut menu, you can display the Picklist Help grid and make a selection from the picklist grid.
Sometimes the additional functionality, or properties, of the Picklist Help grid come in handy in finding a valid entry.