Show Value instead of Code when I run the Form

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?
 
D

Dirk Goldgar

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.
 
B

BruceM

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.
 
D

Dirk Goldgar

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.
 
B

BruceM

Thanks, that's what I thought. I understood your meaning differently in the
previous posting.
 

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

Top