K
Ken Snell [MVP]
The "popup" request that you got means that State Abbreviation is not the
real name of the field that holds the state abbreviation in your table (I
used it because that is what you posted). Replace it with the correct name.
--
Ken Snell
<MS ACCESS MVP>
real name of the field that holds the state abbreviation in your table (I
used it because that is what you posted). Replace it with the correct name.
--
Ken Snell
<MS ACCESS MVP>
joedewing said:Okay, I didn't know if there was a way that you could type a letter and
then
scroll down from that position without opening the box.
SELECT [State Abbreviation], [State] FROM StateAbbreviation ORDER BY
[State
Abbreviation];
It put the abbreviation in a wierd order and the first time (only the
first
time) a box popped up for me to enter the State Abbreviation.
Thanks again.
Ken Snell said:If you open the combobox's dropdown list, the down arrow will move you
down
the list.
Post the Row Source expression that you tried to use, based on what I
posted, in order to display the abbreviation in the box after you make a
selection.
--
Ken Snell
<MS ACCESS MVP>
joedewing said:Okay, this is getting way to complicated. I tried your Row Source
expression
below and I don't think I got it to work right. Lets forget all about
the
entire state name, lets just go with the abbreviation. Ideally, type i
and
IA comes up, type ii and IL come up. Now I know that Access doesn't
work
that way so is there a way to make the down arrow key work? ie press i
to
get
IA and then press down to get IL, IN, ...
Thank you for all the time you are spending on this.
:
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>
message
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>
in
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.