Show Value instead of Code when I run the Form

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Hi, I'm using Access 2007. I have a tabular form and made my StateCd column
a ComboBox

I figured out how to bind to my States table so that when the dropdown is
selected, I see the following in the list.

....
NY - New York
OH - Ohio
OK - Oklahoma
etc..

When I select Ohio, I see OH in the textbox portion of the combo. But I
want to see 'Ohio' instead. Is this possible?
 
Dave said:
Hi, I'm using Access 2007. I have a tabular form and made my StateCd
column
a ComboBox

I figured out how to bind to my States table so that when the dropdown is
selected, I see the following in the list.

...
NY - New York
OH - Ohio
OK - Oklahoma
etc..

When I select Ohio, I see OH in the textbox portion of the combo. But I
want to see 'Ohio' instead. Is this possible?


The textbox part of the combo will show the first visible column; that is,
the first one with a nonzero width. Presumably your combo box already has
its Column Count property set to 2 and its Bound Column property set to 1
(on its property sheet in design view). Also set its Column Widths property
to

0"; 1"

(or "0cm; 2cm" if you're using centimeters instead of inches as the unit of
measurement).

Naturally, you should feel free to set the second column's width to whatever
width looks good in the list. That doesn't have to be 1. But the first
column must have a width of 0.
 
In my experience (which does not include Access 2007 in any significant way)
a single visible column will be the width of the combo box unless the list
width is something other than Auto.
 
BruceM said:
In my experience (which does not include Access 2007 in any significant
way) a single visible column will be the width of the combo box unless the
list width is something other than Auto.


If any column widths aren't specified, widths of these columns is determined
by remaining width of list (after subtracting those column widths that *are*
specified) divided by the number of columns whose widths aren't specified.
The width of the list will be the width of the combo box, unless the
ListWidth property is set to something other than Auto.

For multi-column combo boxes I almost invariably set the width of the list
and the width of each column.
 
Thanks, that's what I thought. I understood your meaning differently in the
previous posting.
 
Back
Top