Combobox not binding properly

Lol999

Registered User.
Local time
Today, 01:20
Joined
May 28, 2017
Messages
184
Can't understand this one (no surprise) but I have a combobox on a subform.
The combobox has two columns in it: Column1 and Column2.

During use the combobox displays column2. when I review the record again in it's subform the field values are appropriate to column2.

However, when I view the data in the table feeding the subform the values in the respective field are all from column1!
This makes querying somewhat difficult and it just strange.
I've looked at formatting fields etc and everything seems to be okay.
Could someone have a look at the innards please?
It's probably something remarkably simple :D

Many thanks, Lol
 

Attachments

that is how it is supposed to work. The table stores the actual value, the combo on the form displays the required value. If you want to see the actual value in the combo, include a column width for the first column - it will currently be set to 0. But then you won't see the required value.

it should not make querying difficult. The combo is bound to column 1, so a query based on the combo needs to use the column 1 value - and will do.

That is why it is always recommended not to use lookups in tables. You see text e.g. a name, but the real value, the pk is hidden
 
The bound column property determines which column is saved. Normally it is the ID that you'd save in related tables.
 
the value saved in the table will be the bound column of the combobox.
the bound column 1 will save the 0 column of the combo.
the bound column is 1 based as opposed to the combobox columns which are zero based.
 
Thanks everyone for clearing that one up for me, much appreciated.
 

Users who are viewing this thread

Back
Top Bottom