PRB: Duplicate Column Appears in Combo or List BoxLast reviewed: February 20, 1996Article ID: Q146118 |
The information in this article applies to:
SYMPTOMSSetting the RowSourceType of a combo box or list box to 6-Fields or 2-Alias and then either concatenating the first two fields together or using a function, such as UPPER(), on the first field causes the object to duplicate the data from the first column into the second column.
WORKAROUNDUse an SQL-ELECT statement to select the data before placing it in the object when you want to concatenate fields or use functions with data. For example, the following SQL-SELECT statement places the city and phone fields into the first column and the postalcode field into the second column:
SELECT city+phone,postalcode FROM customer INTO CURSOR TEMPYou need to type this SQL-SELECT statement into the RowSource property, and change the RowSourceType to 3-SQL Statement. You can also place certain functions (such as UPPER, LTRIM, and RTRIM) in a SQL-SELECT statement. However, other functions, like SUBSTR(), give an error when placed in a SQL-SELECT statement. Another option is to use an array or the AddItem method to populate the combo box or list box. For more information about populating an object by using the AddItem method, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q137183 TITLE : How to Add Items to a Multiple-Column Combo Box STATUSMicrosoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
|
Additional reference words: 3.00 3.00b VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |