Something is still not right with the combo box if you're not seeing the
"expand" behavior, especially after you rebuild the combo box. By any
chance
is the State field a lookup field in the table? What is the Format
property
of the combo box? What is the Control Source of the combo box? What type
of
field is that control source's field (if there is a field in the Control
Source)?
By "want the AL to be in the field", I assume that you mean the AL should
display in the combo box's textbox feature when the state has been
selected?
If yes, then this is much more complex if you want the ability to type in
the full state name in order to select the state.
If you want to be able to type the abbreviation, we can do that by
changing
the Row Source setup for the combo box. Open up the form in design view.
Right-click on the combo box and select Properties. Go to Data tab. Type
the
following expression as one line (replace TableName with the actual name
of
the table) into the Row Source box (replacing the table name that is
there
now):
SELECT [State Abbreviation], [State] FROM Tablename ORDER BY [State
Abbreviation];
If you want to be able to type state name and then show the abbreviation,
the easier way to do this would be to use a textbox and combo box side by
side. But this setup will mean that the combo box will show the state
name,
and the text box will show the state abbreviation. See this article at
The
ACCESS Web for information on how to do this:
http://www.mvps.org/access/forms/frm0058.htm
If you want the combo box to show the state abbreviation after being able
to
select by state name, then you will need some more complex programming
that
would change the properties of the combo box when the person wants to
make a
selection, and then change them after the selection is done (not
recommended), or use overlaying textbox and combo box combination where
the
form's programming allows the user to select in the combo box but
displays
the textbox. If this is really necessary, we can work through this. But
let's go through the above stuff first.
--
Ken Snell
<MS ACCESS MVP>
State State Abbreviation
Alaska AK
Alabama AL
etc.
Since we are getting this involved the people that are entering data
want
to
be able to type ala... and get Alabama (what we have been working on)
but
then when that state is selected (by hitting enter or tab to next
field)
they
only want the AL to be in the field. Are you wishing you didn't answer
me
to
begin with now?
Thank you very much.
:
Row source value is the name of a table? OK, then post the names of
the
fields, in the order in which they occur in the table.
--
Ken Snell
<MS ACCESS MVP>
Row Source I am not sure what you are saying here. The combo box is
not a
query it is based on a table.
Auto Expand "Yes"
Column Widths"Blank"
Bound Column "1"
:
Post the Row Source query's SQL statement that you're using for the
combo
box. Post the Auto Expand property value, the Column Widths
property
value,
and the Bound Column property value for the combo box.
--
Ken Snell
<MS ACCESS MVP>
It wasn't but it is now and is still does't work, so I deleted it
and
recreated it and I am still getting only ari when trying to get
arizona.
Thanks again.
:
Is the field that contains the state name the first visible
column
for
the
combo box?
If it is, the combo box may be corrupted. Delete it and recreate
it.
--
Ken Snell
<MS ACCESS MVP>
message
Right, but it is not filling it in for me I type ari and all I
get
is
ari.
My AutoExpand is set to Yes and my Limit To List is set to
Yes.
:
That is what ACCESS does by default... it's called the
AutoExpand
property
of the combo box.
--
Ken Snell
<MS ACCESS MVP>
message
Well, what about typing in to get to Indiana or ari to get
to
Arizona?
:
You would need to write programming for the combo box to
do
this.
What
you
want to do is not intuitive...ACCESS's combo boxes use the
feature
that
you're seeing...called AutoExpand.
--
Ken Snell
<MS ACCESS MVP>
message
I have a Combo Box in a form that contains a list of all
50
US
states.
I
want to be able to type one leter ie. I and get Iowa and
then
Type I
again
and get Idaho ect. Currently I get Iowa with the first
I
and
when I
type
I
again it simply types II in the field.
Any Ideas?
Thanks.