Lookup Field 2nd Column

  • Thread starter Thread starter Rose
  • Start date Start date
R

Rose

When using a lookup field within a form to choose information within another
table, how do you have the ID be the bound field but show a second field in
the form for the user. For example. There is a table for Cities. The first
field is CityID (AutoNumber) and the second is the name of the City.
Currently if the user uses the lookup field in the clients form, they can see
City in the dropdown list but the CityID is what shows when you choose a
record. Any Ideas how to show City Name instead?
 
here are the settings you need for your combo box:

in the properties, Data Tab:
Row Source needs to be returning (at least) both the CityID and
CityName.
Bound Column = Column of CityID (i am assuming this is column 1)

on the Format Tab:
Column Count = 2
Column Widths = make the first width 0" if you do NOT want to show
CityID (will still be stored/bound, just not displayed). second
column width can be the width of the combo box. example: 0";2"


That should do the trick.
 
hi Rose,

When using a lookup field within a form to choose information within another
table, how do you have the ID be the bound field but show a second field in
the form for the user. For example. There is a table for Cities. The first
field is CityID (AutoNumber) and the second is the name of the City.
Set the following properties:

Page Data:
Control Source: <your field>
Row Source: SELECT CityID, CityName FROM Cities ORDER BY CityName;
Row Source Type: Table/Query
Bound Column: 1

Page Format:
Column Count: 2
Column Widths: 0cm;5cm

instead of centimeter use the appropriate measure.


mfG
--> stefan <--
 
Back
Top