1.

Solve : In Vb-6, more than 1 field in a popup of combo box?

Answer»

Sir,
In my VB-6 PROJECT, There are 4 fields in a table like below.
___________________________________
Class | subject | Author | Price |
---------|-----------|-----------------|---------------|
I | Maths | AAA | 25.50 |
--------------------------------------------------------
II | Maths | BBB | 52.37 |
--------------------------------------------------------
III | Maths | CCC | 75.99 |
--------------------------------------------------------
I linked this table to a combo box in VB-6, It SHOWS only one field of this table. I want that combo box should show all these field so that when I feed data, I may KNOW exact information that who is author and what is its price etc and when I click on any of it, only one field should appear in combo box after close of its popup.

I tried to join fields by using + and trim function for integer fields like "maths" + "|" + "author" + "|" + trim("price"). This syntax shows all JOINED fields in popup of combo box but when I select one of them, the entire line (joined) appears while I want only one of them to appear in combo box

This syntax of joining fields is working fine in FoxPro as I want above. All joined fields are shown in popup while only one filed appears in get field after selection of required field.
Is it possible in VB-6 ? If Yes, Please help me. Quote

the entire line (joined) appears while I want only one of them to appear in combo box

If you only want one of them, handle the Change() Event and change the Text property if the combo box to reflect the selected field.


Discussion

No Comment Found