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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field connected to another field 1

Status
Not open for further replies.

mguwc

Technical User
Mar 16, 2004
74
US
hi All - I'm not sure how to do this but I'm sure someone will have the answer.

I have a table/form called organizations. It has fields called [city], [state], [zipcode]. The [zipcode] field, I can make a combo box using another table called USZipCodes as my record source. What I would like to do is when I select a zip code or just add one of my own (if I decide to make this a text box versus a combo box), then the city and state will automatically appear. The table "USZipCodes" contains fields called [city], [state], [zipcode], [county]. Since "USZipCodes" has the information, I would like to bypass entering it into my form.

Does anyone have any ideas on how I can do this?

Thanks - maria
 
the best way is probably to create a subform bound to the zipcodes table, and whenever you're done entering a zipcode, rebound the subform to the relevant record, and refresh...
 
Hi

Make the combo box for zip code have three columns:

ZipCode, City, State

in the after update event of teh combo box control put code like so:

txtCity = cboZipCode.column(1)
txtState = cboZipCode.column(2)

using your own control names of course

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top