Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to enter a list in a Combo-box
Message
From
02/12/1997 12:38:15
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00063307
Message ID:
00063335
Views:
57
>>>I'm new to VFP5.
>>>I can't seem to find out how to use the combo-box. In FPW you had a drop-down popup list box dialog, where you could enter a list of names, corresponding with a numeric field of a table.
>>>
>>>I have a numeric field in a table which has values of either 1, 2 or 3 representing "Pounds", "Dollars" or "Yen". Where and how do I enter these words in the combo-box, so that when the form is run, either of these three words can be selected.?
>>
>>Use Combo.Rowsourcetype=6 and Combo.Rowsource="table1.field1"
>
>I have tried this, but when I run the form, I get a dropdown scrollable list of numeric 1's 2's and 3's for my entire table's money field.
>
> As I navigate through the records of my table, I want the combo-box to display the words "Pounds" if the table.field = 1, "Dollars" if the table.field = 2 and "Yen" if the table.field = 3. If I want to then change from "Pounds" to "Dollars", I can click on the combo-box drop-down arrow and select the word "Dollars" (this must also change the numeric field from value of 1 to a value of 2).
>I realize that I will have to type these words ("dollars", "pounds", "yen") somewhere in the combo-box properties, but where and how?

Combo.Rowsource="table1.field1" means that field1 contains Pounds,Dollars,etc., besides table1.field2 which contains 1,2,etc. Surely, you can hardcode it, but it's much better to have it in table, just from maintainability standpoint.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform