
Ho do I calculate distance based on zip code (stores within distance)
Quote:
> Hi,
> I am trying to figure out how to determine the distance from any valid zip
> code to another, then display result depending the distance found. For
> example: Enter your zip code to find a store locations that are within
> (combo box) 10miles. 50miles, 100miles etc. Then display the results. I am
> using an access database and Vbscript. I am hoping I could purchase a third
> party utility/db that already has normalized tables that include the zip
> code tables. Then I would simply need to add table or two for the data I
> want displayed depending on the query result. If anyone could point me in
> the right direction I would appreciate it very much.
> Regards,
> Sean
I don't know about the US, but in the UK, you can get a database from
the Post Office containing all post codes (zip codes) and there
associated x,y co-ordinates on the national grid. I have in the past
used code to convert the x,y co-ordinates to latitudes and longitudes
and done a distance calculation based on the great circle method.
--
Hope this helps
Tony Oakley (MVP)