Need listbox to select state but show abbreviation

G

Guest

Hiya!

I have a table where I have typed out the names of the states in one column
and the abbreviation in another. I want to create a control where the user
can open a list that shows all the state names but when the state is selected
the appropriate abbreviation is what will be displayed. Any ideas.

TIA

Chaz
 
W

Wayne Morgan

You can do this with a combo box. You can display multiple columns in the
combo box's drop down list but the first visible column will be displayed in
the textbox portion of the combo box when the selection is made. The drop
down list will show the abbreviation and the name, but the abbreviation will
go into the textbox portion when you make the selection. If you want only
the name to appear in the drop down list, set the width of the abbreviation
column to something larger than zero but still so small that it doesn't show
when the drop down is open. I tried 0.01" and Access changed it to 0.0098",
but it appears to do the trick.
 
G

Guest

Wayne,

It is folks like you that really make these discussion groups work! I
figured something along those lines was what I needed but could not figure
out the "how-to" of it.
Incidently, for anyone who uses this post to answer their own question along
these lines, I right-clicked on the combo box to establish the properties. I
made the first column (the abbreviation column in my case) the width Wayne
suggested put a semi-colon and a width of the second column to 1". Also, in
order to make the state names visible, I had to set the "List Width" to 2"
because the combo box is actually smaller than the width of the second column.
Thanks again Wayne.

Chaz
 

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