I have a combo box with 2 columns...JobName
and JobAddress. I sort it by JobName, but JobName
is only a reference...I want to return the value for
JobAddress to the form. It will only return the
JobName to the JobAddress box.
I don't understand what you mean by "It will only return the JobName to the
JobAddress box." I don't know what Controls you have, nor what the name of
the Combo Box itself may be, so it's really difficult to answer.
A ComboBox allows a user to select one of the entries in its list. The value
of the Combo Box is then set to the Bound Column of the List -- as specified
in the Properties of the Combo Box. Unless you've used the ComboBox wizard
to use the Combo to locate a Record to display, the Combo itself doesn't
"return a value" to any other Control. This could be your problem if you
mean the Combo Itself has the value of the wrong column -- check which is
your Bound Column (the Bound Column is often an ID field, and not even
displayed).
If you are using the Column property in VBA code, in code the column numbers
are 0-based, that is, the first one is Column(0), the second Column(1) --
yet in the ComboBox properties, they tried to make it "easy on us" by using
a one-based notation... first column as 1, second as 2, etc.. This could be
the cause of your problem if you are setting another Control from VBA code
in the Combo's AfterUpdate event.
Larry Linson
Microsoft Access MVP