How to Add Items to a Combo Box with RowSourceType of ValueID: Q138654 The information in this article applies to:
SUMMARYComboBoxes with a RowSourceType of Value are used quite frequently for lists that have a defined number of choices. However, there are times when you may want to add what the user types into the combo box to the list. This can be done programmatically by using the RowSource Property.
MORE INFORMATION
Step-by-Step Example1. Open the Forms Designer, and place a combo box and text box on the form. 2. With the combo box selected, click the Data tab in the Properties 3. Click the Methods tab, double-click the LostFocus event, and place the
4. Run the form.
5. In the combo box, type "Choice3" (without the quotation marks) and press There are two important notes about this example. The first is that the
item will only exist in the list as long as the form is running. Once you
quit the form, the item will be removed from the list. The second is that
there is a 255-characters limit to the length of the string that makes up
the RowSource.
Additional reference words: 3.00 VFoxWin KBCategory: kbprg kbhowto KBSubcategory: FxprgGeneral |
Last Reviewed: October 29, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |