Combo Box - Enter different than selected.

  • Thread starter Thread starter Heath
  • Start date Start date
H

Heath

WHAT IT DOES:
- I've got a Combo Box linked to a table that has 2
columns.
- The Row Source is looking at column 2 (as it's supposed
to).
- I can then select this as the data that goes into the
record(s).

WHAT I'D LIKE IT TO:

- As above... but...
- I want the Combo Box to display the full names (column
2) that are in a table. But the data put in the record to
be the correspionding data in columm 1.

i.e:
- instead of putting "John Doe" (which is in column 2 &
combo box)
to put "J. Doe" (which is in column 1)

- instead of putting "John Smith" (Column 2 + Combo Box)
put "John" (which is in column 1)

(there is no set rule for the relationship between the
two columns, it is whatever is put in by the user)

Any ideas welcome,
Thanks,

Heath
Primary = (e-mail address removed)
Secondary = (e-mail address removed)
 
Heath said:
WHAT IT DOES:
- I've got a Combo Box linked to a table that has 2
columns.
- The Row Source is looking at column 2 (as it's supposed
to).
- I can then select this as the data that goes into the
record(s).

WHAT I'D LIKE IT TO:

- As above... but...
- I want the Combo Box to display the full names (column
2) that are in a table. But the data put in the record to
be the correspionding data in columm 1.

i.e:
- instead of putting "John Doe" (which is in column 2 &
combo box)
to put "J. Doe" (which is in column 1)

- instead of putting "John Smith" (Column 2 + Combo Box)
put "John" (which is in column 1)

(there is no set rule for the relationship between the
two columns, it is whatever is put in by the user)

This may be simpler than you suppose, or I may be misunderstanding you.
Check me on this: your combo box has two columns; column1 has the
"nickname", and column 2 has the full name. You want the combo to
display the full name, but store the nickname. Right?

Then set the following properties for the combo box, on its property
sheet:

Bound Column: 1
Column Count: 2
Column Widths: 0"; 1.5"

In setting the Column Width property, pick whatever width for the second
column seems appropriate. If your unit of measurement is centimeters,
you'll have cm instead of " for the units.
 
Back
Top