Will this formula work in Access (distance between Lat/Long points

E

efandango

I am trying to work on a query that will give me the distance between two
geo-points.

My question is will this formula work 'as is' within Access or do I have to
make some alterations. The formula uses the 'Great Circle Distance'
calculation. I'm not very good at high maths/trig, so was hoping that I could
somehow paste this into a VBA function and use it with adjusted field
references (Lat/Long). I found the formula elsewhere, and it works perfectly
in Excel.

=RadiusEarth*ACOS(COS(RADIANS(90-(Lat1*24)))*COS(RADIANS(90-(Lat2*24)))+SIN(RADIANS(90-(Lat1*24)))*SIN(RADIANS(90-(Lat2*24)))*COS(RADIANS(24*(Long1-Long2))))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top