Calculte distance between two points

SteveL13
SteveL13 used Ask the Experts™
on
If I have a table with Locations, Latitude, and Longitude, is there a way with MS Access to calculate the distance between them?

I'd have a form with two comboboxes.  The user would select two different locations in those comboboxes.  Then in a text box on the form would be the distance between them.

Possible?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
MIS Liason
Most Valuable Expert 2012
Commented:
Distinguished Expert 2017
Commented:
Here is something that is in VB.

https://www.geodatasource.com/developers/vb

Here's a link with an Access sample already built - get rid of the " -- " strings I used to break the link.

http -- :// -- www  -- .access-programmers -- .co -- .uk -- /forums/showthread.php?t=225339

Author

Commented:
You both posted the same solution 7 minutes apart.  And it works!
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Distinguished Expert 2017

Commented:
Jeff types faster:)

Author

Commented:
Unsure of the rules.  Do I award to both of you or the first one?  I'm not sure I've ever had exactly the same solution so close to one another.
Distinguished Expert 2017

Commented:
I think the posting order is somewhat out of our control so on any given day, I could have ended up first.  There is no hard rule but if we each posted the same answer minutes apart I would be OK with splitting the points were I in first but awarding all the points to Jeff isn't a problem for me either since technically he beat me.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial