PaddyO Posted December 20, 2006 Posted December 20, 2006 (edited) 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 December 20, 2006 by Guest
Lee Smith Posted December 21, 2006 Posted December 21, 2006 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
PaddyO Posted December 28, 2006 Author Posted December 28, 2006 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.
Stuart Taylor Posted December 28, 2006 Posted December 28, 2006 you can validate the data entered ... say you create a value list from all of the postcodes in the database ... then you tell the field that your user enters the postcode/zip in, that the code must be a member of that value list. you can allow them to override this if need be. best Stuart
PaddyO Posted December 28, 2006 Author Posted December 28, 2006 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
Stuart Taylor Posted December 29, 2006 Posted December 29, 2006 What about a relationship between the entry field and postcode database The validation could just check if a related value exists? (its probably the same relationship as the auto entry/lookup one) Should this will stop IWP from locking up and should be much quicker.
PaddyO Posted December 29, 2006 Author Posted December 29, 2006 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.
Stuart Taylor Posted December 29, 2006 Posted December 29, 2006 This is validation... 1. Your user enters the zip 2. The Validation calc validates the entry 3a. If validation fails ... error message and no auto fill 3b. If validation succeeds ... auto entry does its thing
gandolf Posted May 1, 2007 Posted May 1, 2007 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 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 ...........................................
Genx Posted May 1, 2007 Posted May 1, 2007 Hi Macca, Here's an example. PS. The post codes and suburbs are made up lol. zipz.zip
gandolf Posted May 1, 2007 Posted May 1, 2007 Thanks Genx just the ticket looks like i have some work ahead tho Thanks again your a champ. Cheers
Recommended Posts
This topic is 6417 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 accountSign in
Already have an account? Sign in here.
Sign In Now