Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to enter a list in a Combo-box
Message
De
02/12/1997 15:54:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00063307
Message ID:
00063402
Vues:
64
>>I would give the combobox 2 columns, and then fill in each row manually with the word and the corresponing value. Set the number's column width to 0 and change the bound column to the word's column. The combobox builder allows you to do this easily. Another tip: in situation like this, I fill the number codes and wors into a look up table and base the combobox on this table. This way, if you ever decide that your app will also use Francs, Pesos, or Rubles you only have to add these records to your 'currencies' table, and then you don't have to change any code in the combobox. HTH
>
>Thanks for this advice. I have made a separate table "currencies" and linked it to my main table by the numeric field. I have also placed a textbox on the form to display the new currencies.name field. When I run the form and navigate through the records, the relationship is working, and I see the currencies.name field changing from record to record, corresponding to the main tables numeric value.
>However, I still cannot seem to get combo-box to work. Could you give me some step-by step instructions on where to type the text, and exactly how to type it. (eg. in Rowsource type: Pounds; Dollars ?) I have not yet used a combo box, and am a dummy in this regard.

What you want to do is actually pretty easy using the combobox builder. Right-click on your combobox, and choose builder from the pop-up menu. On the builder screen, choose 'Fields from a table or view'. Then, below, select your currencies table and double-click both fields (currency and corresponding number). Then click the value tab on the builder pageframe. Specify that you want the number field bound, and choose the field in your parent table. If don't want the number to show at all in the combobox, in the combo's property sheet, on the layout tab, change that column's width to 0 (columnwidth property). I hope this gets you pointed in the right direction... feel free to ask any other questions you might have.

Erik
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform