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?
 

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