Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using other fields in a combo box
Message
From
04/03/1998 10:15:38
Steve Camsell
Windmill Associates
Bath, United Kingdom
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00082473
Message ID:
00082480
Views:
31
Hi Michelle,

Set the ColumnCount property of you combo to 3 (or the number of fields in your table). Then use the ColumnWidths property to set what you want to display. eg. if you just want loc to come up, set columnwidths to : "0,[Width of your Combo],0". Only loc will come up.

Alternatively, you could set the RowSourceType tof the combo to SQL and add "SELECT loc, client_num from [TABLENAME] ORDER BY loc INTO CURSOR [CURSORNAME]"

That way you won't have to change the ColumnCount and ColumnWidth as be default it will display the first column, but you will still have access to the client_num via CURSORNAME.client_num

Hope this Helps.

>Hello,
>
>I have a combo box that has as a rowsource and alias of a table. This much seems to be working ok, since when I run the program I can click on the combo box and have fields from the table come up. The problem is that the wrong field is showing.
>
>The table has the following fields: client_num, loc, type. Client_num comes up in the combo box, I'm assuming because it's the first one. I want just loc to come up.
>
>How do I tell FoxPro which field I want to appear in the combo box?
>
>Thanks,
Steve Camsell
Development Consultant
Steve.Camsell@Windmill-DBM.Co.Uk
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform