how to set value of text bounded on combo box?

G

ghost

Hi,
I have a combo box with row sours of a table, and there is a text box. What
I want to do is once the user selects a value from the combo box, the text
box should be filled by a specific data. For example, the combo box has list
of names, and once the user select the name; the text box shows the phone
number of the selected name automatically.
Note: both the name and phone number are in the same table.
How can I do that?
 
L

Larry Daugherty

Make sure that the query for the combobox returns both the name and
phone number. The Phone number does not have to be visible in the
combobox.

In the combobox AfterUpdate Event:

me!txtPhone=me!cboGetPhone.column(n)

HTH
 
G

ghost

thank you Larry but the value of the txtbox returns to a " name" not number,
please advice?
 

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

Top