Using Control Box to populate Text Box on the same MS Access Form

J

Josh

I am using MS Access and I want to set up a control box such that when I
choose a record, it automatically populates data in other text boxes on the
same for. For example, say the combo box has a list of names that are in a
table. You choose one name and a text box on the same form as the combo box
populates with that person's address. How do I do this? I've got the combo
box set up, I just need to know how to link the text box to the choice I make
on the combo box.... Please Help!!!!
 
J

John Vinson

I am using MS Access and I want to set up a control box such that when I
choose a record, it automatically populates data in other text boxes on the
same for. For example, say the combo box has a list of names that are in a
table. You choose one name and a text box on the same form as the combo box
populates with that person's address. How do I do this? I've got the combo
box set up, I just need to know how to link the text box to the choice I make
on the combo box.... Please Help!!!!

To just *display* the address, say, base the Combo Box on a query
containing the address (and all the other fields you want to display).
Set the Control Source of a textbox to

=comboboxname.Column(n)

where (n) is the zero based index of the field you want to see - that
is, if the address is the fourth field in the query, use (3).

If you are trying to store the name and address redundantly in
controls bound to another table... don't. It's neither necessary nor
is it good design.

John W. Vinson[MVP]
 
J

Josh

Thanks John! It worked!!!

John Vinson said:
To just *display* the address, say, base the Combo Box on a query
containing the address (and all the other fields you want to display).
Set the Control Source of a textbox to

=comboboxname.Column(n)

where (n) is the zero based index of the field you want to see - that
is, if the address is the fourth field in the query, use (3).

If you are trying to store the name and address redundantly in
controls bound to another table... don't. It's neither necessary nor
is it good design.

John W. Vinson[MVP]
 

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