How To Use the BoundTo Property to Store Numeric ValuesLast reviewed: January 10, 1997Article ID: Q156179 |
The information in this article applies to:
SUMMARYIn Visual FoxPro 3.0, when the ControlSource property of a combo box or list box evaluates to a numeric value, the ControlSource property stores the index number (position) in the list instead of the actual numeric value that is displayed. However, a new property named BoundTo has been introduced in Visual FoxPro 5.0 to solve this problem.
MORE INFORMATIONThe RowSource property of a combo box or list box specifies the source of the values; that is, it indicates where the data is coming from. The ControlSource property of a combo box specifies the data that is modified when a selection is made. It indicates where the data is going to. When a combo box or a list box is bound to a ControlSource property with character data type, the character value is stored to the ControlSource property as it shows in the list. However, if it is bound to a ControlSource property with numeric data, the numeric value stores differently, depending on the setting of the BoundTo property. Below is a step-by-step example that shows you how to store the actual numeric value to the ControlSource property of a combo box or a list box:
However, if you set the BoundTo property to .F., the index number (position) of the list is stored to the quantity field instead.
|
KBCategory: kbprg kbtool kbui kbhowto
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |