PRB: Duplicate Column Appears in Combo or List BoxID: Q146118 3.00 3.00b WINDOWS kbprg kbprb 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:
You 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:
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 Behavior1. Create a form called test. 2. Add the Customer table from the TestData database located in the 3. Place a combo box on the form.
4. In the properties sheet of the Combo box, set the following properties:
5. Run the form. The combo box duplicates the data from the first column
Additional reference words: 3.00 3.00b VFoxWin
KBCategory: kbprg kbprb
KBSubcategory: FxprgGeneral
|
Last Reviewed: February 21, 1996 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |