Am 21.09.2011 19:00, stripedtomato wrote: > > I have three drop down boxes: City, State, Zip as part of an address record. > As of now, I have to make independent selections for each of these > drop down boxes. What I would like to do is when selecting a city > from the drop down box list, then related state and zip information > would automatically be filled in, in their respective drop down boxes, > and the information stored in their respective db cells. > ========================================================== 22/09/2011: Andreas S�ger Wrote:-
>This is impossible because big cities have more than one ZIP and there are >ambiguous city names. >You may enter a city name and then choose the actual city and zip from >suggested data. >I use to enter zip codes. Each zip code belongs to one particular city in one >state. >Apart from this, big companies and public sectors have their own zip codes. ========================================================== Hi stripedtomato, What you want to do is actually very easy. At least in Australia where it is possible to download a postcode file from the post office (what USA folk call a zip code we call a postcode (with no spaces)). However even without starting from a set data file it is still possible to create the tables and code and add zip codes as and when required. In the City/Suburb drop down list, all cities, suburbs, towns, villages and other zip codes for the relevant country are listed and should be sorted alphabetically then if there are thirty instances of "Bridge Town" for example each would have additional columns in the dropdown list for State, zip code and any other information needed to quickly identify the correct "Bridge Town" then in the afterupdate or onvalidate event (etc. depending on programming platform) simply write code to add the relevant data from the state and zip code columns in the list. Of course to do this you will need a dropdown control capable of handling multiple columns. You could do as Andreas S�ger suggested and sort the list by zip code but that would mean that everyone using the system would need to know the zip codes but this is not very practicable as most people find it much easier to remember actual names rather than the relevant code. So if there was a Bridge Town MA or Bridge Town CA or Bridge Town NJ most users would know instantly which Bridge Town they wanted. (I'm only guessing with "Bridge Town" because the last time I was in the United States of America I lost count of the number of Bridge Towns I drove through. A bit like Kingston in Australia. Every state's got at least one.) Also in Australia, I'm guessing that it's much the same in your country, there are many small adjoining suburbs with the same postcode. So just entering a "zip" code would not necessarily give the correct data for location name and state. In Great Brittan and parts of Europe it is much more difficult because each street has at least one or more postcodes, however these codes come in two parts, the first part represents the area and the second part represents a section of the street. Cheers, if you need any code samples, let me know what platform you are using and I'll see if I can help, Bruce Carlson. -- For unsubscribe instructions e-mail to: [email protected] Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: [email protected] Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
