Forms: Combo: display one field, save another

  • Thread starter Thread starter Paul-AZ-TX
  • Start date Start date
P

Paul-AZ-TX

I would like to display a description field in a dropdown (combo) box, but
when an item is selected from the list, I want the key field to be saved to
the record (not the description field). Is there an easy way to do this? For
Example: I would like to display the full state name (Alabama, Arkansas,
Alaska) but when selected I would like the key field (AL, AR, AK) to be saved
to the Address record.
 
Use these property settings (substitute your table and field names) --

Row Source -
SELECT [KeyField], [Description] FROM YourTable;

Column Count - 2
Bound Column - 1
Column Widths - 0"; 1.5"
 
Paul-AZ-TX said:
I would like to display a description field in a dropdown (combo) box, but
when an item is selected from the list, I want the key field to be saved to
the record (not the description field). Is there an easy way to do this? For
Example: I would like to display the full state name (Alabama, Arkansas,
Alaska) but when selected I would like the key field (AL, AR, AK) to be saved
to the Address record.


Set the ColumnWidths property to 0 for any column you do not
want to see in the list. E.g. 0;
If you do not specify a column's width, it uses the combo
box's Width divided by the number of columns that do not
have a column width specified.

Set the boundColumn property to the number of the field you
want saved in the record.
 
Back
Top