Jump to content

Postal code auto poulate city/state


PaddyO
 Share

This topic is 5638 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

Is there a db out there that I can import with all the US postal codes and corresponding cities/states? I would like my user to plug in the Postal Code and have the city and state fields auto populate. I can do the relationship easily enough, I just need to find a db that I can purchase/download...

Thanks,

PF

Edited by Guest
Link to comment
Share on other sites

This topic comes up from time to time. Do a search of the Forum using [color:blue]"Zip Codes" (include the quotes), and you will get plenty of hits.

Start with this one and see if it doesn't help. Link

HTH

Lee

Link to comment
Share on other sites

Thank you.

I did a search and purchased a db with all the postal codes and a quarterly update for 2 years. Then joined it to my contacts list via the zip code so all the user has to do is plug in the zip and tab on to the next field. The city and state automatically drops in to the related fields.

One thing I did learn the hard way was to protect the city and state fileds from data entry and remove them from the tab order. Before doing so I inadvertantly deleted a couple of cities and states... A quick re-import seems to have fixed the deleted data. My only trouble is that now there is a chance that the user can enter an invalid zip code and move on, thus leaving the city and state empty.

Link to comment
Share on other sites

Hi, Stuart,

I changed the field to validate from a value list defined by the zip codes in the zip code table and worked great locally. But... Since this is an IWP solution it killed the data input process because there are so many zip codes for it to sort through and the connection froze.

Dang.

PF

Link to comment
Share on other sites

Isn't that what I have now?

Guest (customer...) table has G_ZipCode

But the City and State are from the zipguest table with the Zip Code being the key/foriegn fields.

zipguest::city and zipguest::state

When the user commits the record in IWP it fills in the City and State, but by then it is too late , the erroneous Zip Code is already entered and the user is headed back to the transactions table where they were working.

Set Error Capture [On]

Allow User Abort [Off]

Set Field [transactions::gLayoutNumber; Get (LayoutNumber)]

Enter Browse Mode []

Go To Layout["GuestDisplayFromTransactions"(Guests)]

New Record/Request

Go to Field [Guests:G_NameFirst

Pause

Then the Save Record Button returns the user to the Transactions page.

Commit Record [No dialog]

Go to Layout [Transactions::gLayoutNumber]

Halt

Maybe I need an Error message. Well, except for the fact that those don't really work in IWP either...

Hmmm.

Link to comment
Share on other sites

  • 4 months later...

Hi All,

Another newbie here and I have read this topic and have found it interesting and just what I am looking for in my solution.

Unfortunately being a newbie I am having problems understanding and was wondering if anyone could supply a sample of how this works.

I am also not sure how to store the zip/post code and suburb data so it can be recalled :B

I would like to be able to do what PaddyO was doing with the auto fill using drop down menus

I would like my user to plug in the Postal Code and have the city and state fields auto populate.
also not sure on the relationship side.

Any help would be gr8ly appreciated

Thanks in advance

Mac

P.S Have done search on "Zip Codes" and there are no real examples of what is required :confused:

...........................................

Link to comment
Share on other sites

This topic is 5638 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.