Combo Box - Showing data

DC27

Registered User.
Local time
Today, 08:30
Joined
Jun 6, 2008
Messages
27
I have a combo box in a table that shows text data and stores the Autonumber ID. That's all good.

I have a form that uses this table, but as it's a form, i want to show the text rather than the ID... if that makes sense?

I did think of using some code to show the text, but i dont know how to write the code - ie 'when the field with the id is changed, change a text box to show the text that corresponds to the ID'
 
I think I understand your question.
Your combobox is showing multiple columns when opened and you want to only show specific ones.
If you click on the properties of the combobox under the Format tab there is the heading Column Widths which lists the widths of eac column in the combobox separated by a semicolon like 1";1";1";1";1" so all you need to do is change the width of the column you want hidden to 0"

I have a combo box in a table that shows text data and stores the Autonumber ID. That's all good.

I have a form that uses this table, but as it's a form, i want to show the text rather than the ID... if that makes sense?

I did think of using some code to show the text, but i dont know how to write the code - ie 'when the field with the id is changed, change a text box to show the text that corresponds to the ID'
 
Thanks for replying - I thought it would be hard to explain..!

That still shows the ID in the form field because this is what gets stored into the table. What i want to do is when the user selects from the drop down list, it stores the ID but shows the associated text (rather than a number)
 
You proably figured this out allready,

Make the id number the first field in the combo box. In the bound column field enter "1". then in the column Column Widths 0";1";.... this will store the bound column value in the record source field and display only the text to the user.
 
Brilliant thanks - i didnt realise that changing the widt to zero would hide it.
Thanks to both.
 

Users who are viewing this thread

Back
Top Bottom