Combo boxes

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

Guest

I have a combo box with a unique ID number e.g. 1, 2 etc and I want access to
then relate this to a person and put this information into 2 text boxes -
first and last names. Cannot figure out how to do this!!
 
Chantelle Wynn said:
I have a combo box with a unique ID number e.g. 1, 2 etc and I want access to
then relate this to a person and put this information into 2 text boxes -
first and last names. Cannot figure out how to do this!!

Do you just want to store the ID and *display* the name fields? That would be
the correct way to do it. Or do you want to copy the name field data and save
it in your record? That would (generally) be the incorrect way to do it.

To do it the correct way add those two name fields as additional columns in your
ComboBox (hidden if you like). Then use ControlSource entries in your TextBoxes
of...

=ComboBoxName.Column(1)
=ComboBoxName.Column(2)
 
How do I add them as additional columns within the combo box?

Chantelle
 
Chantelle Wynn said:
How do I add them as additional columns within the combo box?

Change the ColumnCount property to 3
Set the ColumnWidths property to 1";0";0" (whatever you want for the 1")
Change the RowSource query so that it includes the other fields

This assumes that the same table you are getting the ID column from also
contains the first and last name fields.
 

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

Back
Top