Two field relation

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

Guest

Hello all

I have a table with custnum and custnam. On a form I have a combo box for the custnum. How can I make a text box automaticaly fill in the custnam once the custnum is selected

Thank
Mark
 
Firstly, change the RowSourceSQL to select the Custnam as
well as the the custNum e.g.

SELECT custNum, custName FROM {yourtable};

In the comboBox AfterUpdate event handler, place code along
the following lines

{yourtextbox}.Value = (yourcombobox}.Column(1)

Hope That Helps
Gerald Stanley MCSD
-----Original Message-----
Hello all,

I have a table with custnum and custnam. On a form I have
a combo box for the custnum. How can I make a text box
automaticaly fill in the custnam once the custnum is selected?
 
Back
Top