ID: Q147208
3.00 3.00b WINDOWS kbtool kbprb kbhowto
The information in this article applies to:
When the IncrementalSearch property of Visual FoxPro's list box or combo box is set to True, the list box or combo box is capable of performing an incremental search of values within the object. However, when the list box or combo box has multiple columns and the RowSourceType property is set to either 2-Alias or 5-Array, the incremental search is applied to the first column in the list, regardless of the column to which the order is bound.
To apply incremental searching to a column other than the first, you need to reorder the field list in the RowSource property of the list box if the RowSourceType property is set to 2-Alias, or reorder the array if the RowSourceType property is set to 5-Array.
For more information on the IncrementalSearch property, Please see the following article in the Microsoft knowledge Base :
ARTICLE-ID : Q137125
TITLE : How to Use IncrementalSearch Property of List and Combo Boxes
This behavior is by design.
This example uses the Customer table located in the Vfp\Samples\Data directory with indexes created on the Company and Contact fields.
1. Using the Form Designer, create a new form.
2. Open the Data Environment, and add the Customer table.
3. Right-click the Customer cursor in the Data Environment window, and
select Properties.
4. In the Properties window (Cursor1 should be the object), set the Order
property to Contact.
5. Add a list box to the form. Set the list box RowSourceType property to
2-Alias, and set its RowSource property to Company + Contact. Set its
IncrementalSearch property to true (.T.), which is the default. Set its
FontName Property to Courier.
6. Save and run the Form. Note that the incremental searching in the list
box is applicable to the first column, which is the Company Field. To
perform an incremental search on the Contact field, which is the second
column, you must reorder the fields to display the Contact field in the
first column.
Additional reference words: 3.00 3.00b VFoxWin
KBCategory: kbtool kbprb kbhowto
KBSubcategory: FxtoolFormdes
Keywords : kbVFp300 kbVFp300b kbVFp600 FxtoolFormdes
Version : 3.00 3.00b
Platform : WINDOWS
Last Reviewed: November 2, 1998