PRB: Incremental Search Always on 1st Col of Multi-Column List

Last reviewed: February 23, 1996
Article ID: Q147208
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0 and 3.0b

SYMPTOMS

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.

RESOLUTION

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

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 23, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.