Correlate Fields

M

Michelle

Hi, want to have a drop down field automatcally correlate with another field.
Example. Drop down field is a name. i want the next field to automatically
fill with the person phone number, and have them be linked so i dont have to
select the phone number or maunally type it in. is this possible?
 
J

Jeanette Cunningham

Hi Michelle,
In the row source for the combo, include the phone number field in the
query.
Add an extra column to the combo.
Set the width of this extra column to 0, so it doesn't show in the combo.

Put an unbound text box on the form.
Give the textbox a control source of
=Me.NameOfCombo.Column(n)
You can lock and disable the text box if you want to prevent users from
editing the phone number.

n is the number of the column that has the phone no.
A combo has its first column numbered as 0, the second one as 1 etc.
Replace NameOfCombo with the real name of the combo.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

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