Zip Code Lookup?

D

Dave Elliott

I have a pop-up form that I use to input the zip and city to my cutomers
form.
Of course there are more than one zip code for some cities.
The table I use uses the fields city; zip codes and zipid. Table ZipCode
How can I make the form allow me to choose from the list of zip codes for
the chosen city?
Right now I can choose only the city and then it looks up the zip for that
city, it shows all the zips for the city,
but you only get to choose whatever is the first zip for that city.
The form has (2) fields. One Unbound as a drop down list for the city and
the other with it's control source set to
=City1.Column(1)
The same sql statement is used, just with the fields in different order.
Here is the code for the first field, i.e. the city, it is unbound.
It is a table/query
SELECT ZipCode.City, ZipCode.[Zip Codes], ZipCode.ZipID FROM ZipCode ORDER
BY ZipCode.City;
The second field which has a control source of =City1.Column(1)
SELECT qryzipcodes.[Zip Codes], qryzipcodes.City FROM qryzipcodes;
After the pop-up form criteria has been chosen, then it pastes the info into
the customer form using this code.
Forms![Customers]![City] = Forms![ZipCodes]![City1]
Forms![Customers]![Postal Code] = Forms![ZipCodes]![Code1]
DoCmd.Close acForm, Me.Name
Can this be done?
 

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

Similar Threads

Form help 4
HOW DO I GET A FIELD TO AUTOMATICALLY FILL IN? 2
Combo Box Lookup ??? 1
Zip Code Lookup Question 1
zipcode lookup table-Access 2007 4
Auto Fill 0
Zip Code Dreams 8
#NAME? Error on Form 2

Top