Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox Display
Message
From
19/10/2004 17:22:28
 
 
To
19/10/2004 13:49:51
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00952729
Message ID:
00952813
Views:
15
>I have a listbox that is populated with a SQL statement/cursor. The cursor contains the following two fields: name and id. What I would like is for the "name" to appear in the dropdown portion of the listbox and then have the "id" appear in the listbox when a name is selected. Is this possible? If so, how?
>
>Thanks in advance!

I would show id AND name in the dropdown portion. In that case you can indeed show the chosen id. Showing id AND name (separated by a line) is also a far more correct design. The item you show (id) should also be visible in the list.

For example:
with thisform.cboExample
    .rowsourcetype = 3
    .rowsource = "select id,name from test into cursor c_effe"
    .columncount = 2
    .columnwidths = "100,100"
endwith
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform