Combo Box Display Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I have a combo box on a form. The combo box has 2 columns (ID and name).
Currently, users can either type in the ID (if they know it) or expand the
combo box to see both columns and make a selection. After the selection is
made, only the ID is displayed. Is it possible to display the name field in
the combo box after the selection is made without losing the ability to type
in the ID? In other words, the users like to type in the ID's they know by
heart, but they want the name displayed after the ID is typed in or after the
selection has been made. Is this possible? If this isn't possible, is it
possible to have both the ID and name displayed after the selection has been
made (just like when the combo box is expanded)? Thanks in advance for any
help.
 
In design view select the ComboBox and right click then select properties.

Set the column widths to display the column you want. You might need to
also change list width.
 
Thanks for the response. I don't think it solves my problem, however.
Currently, I have column 1 (ID) set to 0.3" and column 2 (name) set to 2.7".
The list width is 3". The appearance is fine when the combo box is expanded.
I'm trying to:

1. Have the ability to type in the ID (instead of expanding the combo box
and making a selection). Users can currently do this.

2. Have the name displayed after a selection has been made or ID typed in
(when the combo box is not expanded).

3. Have both the ID and name displayed when the combo box is expanded.
Users currently see this.

Currently, I do have #'s 1 and 3, but after a selection is made only the ID
is displayed. Is it possible to have the name (or both the ID and name)
displayed after a selection has been made (when the combo box is not
expanded)?
 
I usually have a combo to select by a reference number and another to select
by Name to display a record or print a report
 
A possible option is to create another query specifically to use as the
source for the combo box. In that query, create two columns. The first
column is the ID number. The second column is a concatenation of the ID and
the name ... possibly something like "ID - name". As far as Access is
concerned, it's one field.

In the combo box, set it for two columns. Se the width of the first column
to zero, and the width of the second column to the entire size of the combo
box.

When the user types in the number, the "ID - name" field will display and
remain displayed. But the *value* of the combo box is the hidden column
zero --- the ID number.

Bob.
 
Thanks Bob, your idea works great! Exactly what I was looking for. Thanks
to the others who responded as well.
 
Back
Top