Daft combo box problem: whats going on?

S

scubadiver

I am having a lot of trouble binding the second column of a combo to the
record source.

If the "boundcolumn" property is set to 2 and I choose from the list, it
doesn't show what I want BUT if I then change the property to 1 and go back
into the form it then shows the field correctly BUT if I then choose another
from the list it reverts back to showing the wrong column.

Is there something I'm missing (tho I can't think what!)

thanks
 
B

BruceM

Make sure the column count is 2. If you want to see the second column, set
the column widths to something like 0";1.5". Also, if Limit to List is set
to No, the bound column needs to be the first visible column. Is the row
source fixed, or is it being set on the fly?
 
S

scubadiver

At the moment

Column count: 2
Column width: 1.5cm;10cm
Row source: fixed
Bound column: 2
Limit to List: Yes

thanks
 
B

BruceM

This statement is unclear:
"If the "boundcolumn" property is set to 2 and I choose from the list, it
doesn't show what I want BUT if I then change the property to 1 and go back
into the form it then shows the field correctly BUT if I then choose another
from the list it reverts back to showing the wrong column."

Does your Row Source have 2 columns? If so, your combo box will show both
columns. When you say "it doesn't show what I want", do you mean the
drop-down list is other than what you expect? If so, what do you expect?
 
S

scubadiver

The row source does have two columns, it is the source I want. I want to
show both but I want the bound column to be column 2.

If the "boundcolumn" property is set to 2 and I choose from the list, it
shows column 1. If I then go into the design and change the property to 1 and
go back into the same record the field shows column 2 (automatically) BUT
when I choose another from the source list it then reverts back to choosing
column 1.

I can't be much clearer than this.
 
B

BruceM

I asked several questions, and received an answer to only one. The other
questions were relevant.
I take it that the combo box is bound to a field (an unbound combo box has a
bound column, so the fact that there is a bound column says nothing about
the Control Source).
According to the properties you provided, when you click the down arrow on
the combo box you see both columns. Is that correct?
When you say "it shows column 1", do you mean the list displays column 1, or
do you mean that after making the selection the column 1 value is displayed?
In other words, what is "it"?
If you change the bound column to 1 and the underlying field will not accept
that data type, the field may revert to the previous value, but I'm not
completely sure about that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top