PDA

View Full Version : Straight Line Distance Between Zip Codes



Eric Frost
05-08-2009, 12:48 PM
Here's a little Access database for calculating the straight line distance between zip codes. It uses MapPoint to get the lat/lon (geocode) of the zip code. It just puts in 0 if it can't find the zip code. Also, there is a routine to try to standardize the zip code and it writes the formatted zip code back into the original table.

Your database must be placed in a table called ZipCodeList with columns ZipA, ZipB, and StraightLineDistance.

There is a macro "Run Program" which kicks off the code.

See screenshots of the sample data before and after the program is run.

Let me know if you would like help with this or have any questions!

Eric

flystol
05-10-2009, 12:43 PM
Eric, this is a great little program and does exactly what I need. Thanks so much for your help on this problem.

flystol

Eric Frost
05-10-2009, 06:38 PM
Ah - awesome. I was afraid it's a little specific in terms of general needs in the MapPoint Community to add to our Downloads section...

I can think of lots of slight variations that would require only minor code changes. If any other MapForums Plus subscriber needs something similar let me know know and I'll take a stab! :flowers:

Happy Mothers Day!

Eric