>>>>>I searched the threads, but to no avail... A Listbox based on SQL has 5 columns and displays all columns correctly when clicked and the list is displayed, but only shows the first column after selecting an item. I'm sure I'm just missing something simple here. Thanks!
>>>>>
>>>>>Regards, Renoir
>>>>
>>>>Renoir,
>>>>If you mean combo then no you don't. It's default behaviour. Combine few fields to 1 column to show.
>>>>Cetin
>>>
>>>I meant Listbox. Ok, I tried to concantenate fields and show using the DisplayValue, but it doesn't work. Where do I put the combined fields?
>>
>>Renoir,
>>No I meant for combo. Then it's something else - Columncount ?
>>What are the nondefault properties ?
>>Cetin
>
>Cetin,
>
>Properties:
>
>ColumnCount: 5
>ColumnLines: .T.
>ColumnWidths: 100,100,100,200,20
>Enabled: .T.
>FirstElement: 1
>RowSource: SELECT code, type, desc, mfsystem FROM prgfiles\codes INTO CURSOR vCodesList
>RowSourceType: 3 - SQL Statement
>SelectOnEntry: .T.
>Style: 2 - Dropdown List
>
>I want to display all fields after item is selected.
>
>Renoir
Style - 2 ?
Renoir listboxes do not have style property this is combo and it's default behaviour. Back to the combining :
ColumnCount: 1 && Show only combined
RowSource: SELECT code+type+desc+mfsystem, code,type,desc,mfsystem FROM prgfiles\codes INTO CURSOR vCodesList
RowSourceType: 3 - SQL Statement
Style: 2 - Dropdown List
You can get any value back directly using :
vCodesList.code
You don't need to check Listindex etc.
However if this has controlsource than adjust boundcolumn to correct one.
Cetin