ComboBox

  • Thread starter Thread starter Trouble
  • Start date Start date
T

Trouble

I want to use a combo box for one field ie ID No and then
when I select a ID no from it I want the next fied to fill
with the Persons name
 
-----Original Message-----
I want to use a combo box for one field ie ID No and then
when I select a ID no from it I want the next fied to fill
with the Persons name
.
Any help would be much appreciated
 
I want to use a combo box for one field ie ID No and then
when I select a ID no from it I want the next fied to fill
with the Persons name

If you're trying to store the person's name redundantly in a second
table... DON'T. The table bound to this Form should have ONLY the
personID, not the name.

To just *display* the name, it's most common to have the PersonID as
the bound column of the textbox, and set its width to 0 in the
ColumnWidths property; that way the combo displays the name but stores
the ID. If you want to see or select the ID, you can include the ID
and the name in the combo box's RowSource, and put a textbox on the
form with a control source

=comboboxname.Column(1)

where the Column property is the *zero based* list of fields - i.e.
this expression will display the *second* column in the Rowsource
query, that is the name.
 
-----Original Message-----


If you're trying to store the person's name redundantly in a second
table... DON'T. The table bound to this Form should have ONLY the
personID, not the name.

To just *display* the name, it's most common to have the PersonID as
the bound column of the textbox, and set its width to 0 in the
ColumnWidths property; that way the combo displays the name but stores
the ID. If you want to see or select the ID, you can include the ID
and the name in the combo box's RowSource, and put a textbox on the
form with a control source

=comboboxname.Column(1)

where the Column property is the *zero based* list of fields - i.e.
this expression will display the *second* column in the Rowsource
query, that is the name.


.
Thank you for your help John W. Vinson I have almost
cracked it now.
 
Back
Top