Combo boxes on sub form

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

Guest

hi

im using a combo box to select an organisation name from the organisation
table and to fill another field for the organisation id.
once i select an organisation out of the list it changes every row how do i
solve this
please help

thanks
 
An unbound control will have the same value for every record on a continuous
form. Bind the combo box to your Organization ID field, and set the
ColumnWidth property to 0";x", where x is a length long enough to display
your longest organization name. Then the ID will be stored in the underlying
field, while the more meaningful text will be displayed. I never display any
ID fields, but if you wish to display it also, you can bind a textbox to the
same field.

The combo box properties should be something like:
ControlSource OrganizationID
RowSource SELECT Organizations.OrganizationID,
Organizations.Organization FROM Organizations ORDER BY
Organizations.Organization;
ColumnCount 2
BoundColumn 1
ColumnWidths 0";1.5"

Hope that helps.
Sprinks
 
Your combo's control source should be the OrganatizationID
which is based on the organization table, where the first field is the
OrganizationID should preferably be the primary key and the 2nd field is the
Organization name.

For the combo, the bound column should be Column 1
Set column count to 2, Column Widths to 0";2".

The purpose of the ID numbers is to keep the ID in the background and
display a name field which has a meaning for the user. It seems like you want
to do the opposite.

Anne
 
Back
Top