Linking Combo Boxes

  • Thread starter Thread starter Toggle
  • Start date Start date
T

Toggle

Guest
I am trying to use a Combo Box to select a value in a table column, and have it insert a corresponding value in another field. For example, selecting a name in a combo box from coumn 1 in a table, and having the corresponding phone number in column 2 in the table inserted into a separate field... any suggestions would be appreciated. I'm a photographer, not a programmer :-)
 
There are a few ways you could do it. One would be to have the Combo Box "tell" the text box what to show after the Combo Box is updated. (You would place code in the "AfterUpdate" event)

Another way to do it is to create your combo box with two columns. (You could hide the one you don't want to see) To use your example, your combo box would have three columns:

ID
Name
PhoneNumber

You would then place the following in the text box:

=[ComboBoxName].[Column](2)

(Combo boxes are 0-based, so the first column is Column 0, the second is Column 1 and so on)
 

Users who are viewing this thread

Back
Top Bottom