PRB: List from Array May Display Incorrect Number Of ElementsID: Q137179 The information in this article applies to:
SYMPTOMSWhen an array that is the RowSource for a list box is redimensioned to a lower number of elements than originally displayed in the list box, there will be blank rows in the list representing elements from the previous array.
RESOLUTIONIssue one of the following (assuming the list box is placed on the form and is named List1) after redimensioning the array to allow the list box to display the correct number of elements:
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior1. Type OPEN DATA in the Command window and select the 2. Type the following command in the Command window:
3. Create a new form, and put a list box object as well as a command button
4. In the properties for the list box, set the RowSource property to test
5. Place the following code in the command button's Click event procedure:
6. Run the form. Click the command button, and note "Germany" will appear
Example ResolutionModify the code in the click event of the command button, and add any one of the following after the SELECT command. This will allow the list box to display the array elements without the blank rows at the bottom of the list:
Additional reference words: 3.00 VFoxWin KBCategory: kbtool kbprb KBSubcategory: FxtoolFormdes |
Last Reviewed: September 25, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |