Dear John:
I am not trying to reproduce the same info in another
table. I am trying to create new client list for whom we
need addresses and zipcode, stuff like that.
I have a list of cities that have correlating zipcodes (or
you can call it vise versa), it would be great if I don't
need to type in the cities (lots of clients are from the
same 20 something cities) if I can just use the zipcode as
a toggle for auto population of the cells CITY,and STATE.
We also give counties in WA state a county code that can
be done in the same fashion if I know how.
Please help. Highly appreciated! At what time are the
live chat? Where is the link?
Thanks,
Kath
I'd simply store the zipcode in the Address table, then. Except for
the rather uncommon cases where a given zipcode covers several cities,
you can simply create a Query joining your contacts table to this
table by Zip, and pull the city, state, and (for that matter) county
from the zipcode table.
Howver, there may be some benefit to storing the city etc. in the
address table; it'll be a bit faster than using a Query and will allow
for (e.g.) a zipcode that laps over a county boundary. Use a Form
bound to your address table, with a Combo Box displaying the zip (and
bound to the zip field in your table); include the city, state, and
county in the combo's rowsource query.
Then in the combo's AfterUpdate event put code like
Private Sub cboZip_AfterUpdate()
Me!txtCity = cboZip.Column(1)
Me!txtState = cboZip.Column(2)
Me!txtCounty = cboZip.Column(3)
End Sub
Note that the Column property is zero based - I'm assuming the first
column, Column(0), is the zip field.