Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box displays only position number

Status
Not open for further replies.

markswan20

Technical User
Jun 17, 2005
58
GB
I have numerous combo boxes on my form when i select the relevant item it displays in my table as a number not as the text selected is there any code that will enable me to see the text as opposed to the position number.

Kind Regards
Mark
 
does this combobox have more than 1 columns? (columncount property) Is one of the column set to 0 width? (columnwidths property)



--------------------
Procrastinate Now!
 
How are ya markswan20 . . . . .

The combobox allows you to display one column and store another.

[ol][li]Whats displayed in the texbox portion is determined by the [blue]first non-zero column[/blue] in the [purple]Column Widths[/purple] property.[/li]
[li]What gets stored is determined by the [purple]Bound Column[/purple] property (default is the first column!).[/li][/ol]
A standard setup has the PK as the first column and one or more additional columns, with the [blue]PK hidden with a column width of zero[/blue]. So with bound column set to 1 (the PK), your displaying one column and saving the PK!

[purple]You can try setting the Bound Column property to 2 . . .[/purple]

Calvin.gif
See Ya! . . . . . .
 
Have a look at JOIN and RelationShips

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How are ya PHV . . . . .
PHV said:
[blue]Have a look at JOIN and RelationShips[/blue]
Ya totally lost me with that one!

Calvin.gif
See Ya! . . . . . .
 
Hi TheAceMan1 !
For me it's normal behaviour that the FK value (ie number) is displayed in the Table.
To see the corresponding text you have to join the referenced table.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top