HELP: Assistance required with trying to calculate distances based on latitude and longitude

C

Clinton M James

Hi All,

I have been searching the net everywhere and have not been fruitful as yet.

I did find formulas to determine distances but when i put them into an SQL
statement they cause errors. it appears Access spits the dummy if you have a
calculation that is too long. I first tried it in MS Query in Excel and it
kept popping up a statement to the effect of an error, then i put it
directly into Access and the colums results all show "#error".

I constructed the calculation slowly, part by part and it was accepting the
staged construction until towards the very end.

I was attempting to do it purely though an SQL SELECT statement rather than
creating any functions, etc as my level of knowlwedge lies with straight SQL
queries

Is there anywhere on the net I can be pointed to that can help me with this?

I have one table called 'location'

This table has a column for the latitude degrees, another for the latitude
minutes (obviously these will need to be combined to form a decimal degrees
figure), and same for the longitude.

I am going to use vba through excel to communicate with the database that
has these coordinates. I am attempting to have VBA pass an SQL statement
with static coordinates (the base location) and find all locations within 20
km of this base.

Columns i have outside of the coordintates are 'locality' and 'postcode'.

Help in pointing me to a resource for this is appreciated or if somebody can
even help as well.

Thank you so much in advance if any help is rendered.

Regards,
Clint
 

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