help! what is the best approach

  • Thread starter Thread starter dan
  • Start date Start date
D

dan

I have several forms on which there is a combo box to
select an entity. For example, for a club record I have a
combo box to select the manager from a list of people.
The list of people comes from a contacts table. So, every
contact, no matter what type, is stored in a contacts
table.

Now, when I update a club record I don't want to update
the contact details of the manager, I just want to say who
is the manager of the club.

But what is the best way to implement this in a form?
When the club record is selected, I want the name of the
manager to appear, but obviously the underlying data that
is stored is the ContactId of the manager from the
Contacts table. Also, when selecting a different manager
from the combo-box, the name must appear but the ContactId
needs to be the value that is stored.

I have hacked away at doing this but I'm not sure what is
the recommended way of implementing this. For example,
showing one value but binding to another column, etc.

Any advice would be appreciated.

dan.
 
Dan,

This is a very common practice. You achieve this type of outcome by
manipulating the properties of the combobox. For the RowSource of the
combobox, use a query that includes both the ContactID and the
ContactName. Then, set the combobox's properties as follows...
Column Count 2
Bound Column 1
Column Widths 0;x
(Where x is a suitable length to show the name)

- Steve Schapel, Microsoft Access MVP
 
Ahh, thanks, I was always doing what you said - apart from
the column width "0;...". This sometimes made things not
quite work as you'd expect.
 
Back
Top