Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use combo box to populate another field

Status
Not open for further replies.

jh3016

Programmer
Jun 6, 2003
148
US
I am lost.

I have a table that has District and the corresponding Region in it.

So I made a form and put a combo box in it. When I choose Chicago, I want a text box to automatically put in Central. When I put Los Angeles, I want it to put in West. I have searched and searched, but I can't understand any of the postings.

Could someone give me step by step instructions?

thanks in advance.
 
Your combo box data includes all the information?

Like field one is Los Angeles, and field 2 is West?

If so, your text box needs to be bound to the combo box, or have its data source say

forms!yourformname!yourcombobox!column(1)

Column 0 is the first column, so if Centeral is the second, use 1, or what ever it is.

ChaZ

Ascii dumb question, get a dumb Ansi
 
Thanks for quick response, but I must be doing something wrong. Here's more detail:

Table Name = EEInfo
Form Name = EEInfoForm
Combo Box = District
In the combo box, there are two fields:
Field 1 = District
Field 2 = Region

When I use the combo box on the form and choose the district, let's say, Chicago, I want another field to display the Region, which is Central. This way, I don't have to look up each time which region these cities are in.
 
I understand. If you make a text box, named anything, and put it below your district combo box, you can make its control source say =forms!EEInfoForm!District!column(1) and this will autopopulate the new text box with the region in your combo box.

It is not bound to a field in your table, but will display the data.

Hope that helps.

ChaZ

Ascii dumb question, get a dumb Ansi
 
I must be doing something wrong. I copied and pasted exactly what you had. But it keeps putting [ ] around the fields.

Help!
 
Yes, sorry, it will put [] around the fields. It needs that.

Did it work though?

Ascii dumb question, get a dumb Ansi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top