Forms: Combo: display one field, save another

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.
 
K

KARL DEWEY

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"
 
M

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top