Combo Box Text

davies107

Registered User.
Local time
Yesterday, 23:25
Joined
Oct 2, 2012
Messages
143
i have 2 combo boxes. 2nd combo box is dependent in the first combo box. values work perfectly fine. my problem is that, these combo boxes are in a Form that will add new records, once a new record has been added the item in my Table shows a number not the exact word.

For example:

Combo Box 1:

(ITEMS) - (ITEM ID)
Apple - 1
Banana - 2
Grapes - 3
Orange - 4

Combo Box 2; if the user click Apple, these are the choices:
Yellow
Green
Brown
Black

and if the user click Green, it works fine, in the form.. it shows Apple and Green.

but once I saved it the problem occurs. what is saved in the Table is 1 and Green...

Anyone has an idea?
 
If you are really wanting to put text into your table (rather then the preferred ID) then it's likely your combobox is bound to the wrong field. Check its properties. You can have multiple columns, but only one of them can have its value stored in the field.
 
Limit to List is set to YES while others are NO. Those with NO property accepts the text. BUT, Limit to List cant be changed to NO for this ComboBox, it prompt me with this error:

Microsoft Access can't set the LimitToList property to No right now.

The first visible column, which is determined by the ColumnWidths property, isn't equal to the bound column

Adjust the ColumnWidths property first, and then set the LimitToList property


If i change the columnwidths, values changes...
 
Thinking specifically of the BoundColumn property...
 
boundcolumn property is set to 1, same with the other comboboxes. other comboboxes doesnt have problems, only this combobox saved the ID and not the name of the item.
 
The problem is you don't understand how databases are normally constructed. The ID is what should be getting saved in the table.
 
others are fine, they dont save the ID, its the only 1 combobox that i have a problem.
 

Users who are viewing this thread

Back
Top Bottom