Hello,
I am using access 2010 on windows 7. I am trying to create a form in visual basic express 2010 that I can use to input data into a table. I have that completed. The problem I am having is I have text boxed for a used to input in a decimal format latitude and longatude with a button. When the button is clicked I want to display on the form the distance in miles and also input that data into the table. Here is the problem I just need a simple formula and I am trying to use this
Thank you for you help,
John
I am using access 2010 on windows 7. I am trying to create a form in visual basic express 2010 that I can use to input data into a table. I have that completed. The problem I am having is I have text boxed for a used to input in a decimal format latitude and longatude with a button. When the button is clicked I want to display on the form the distance in miles and also input that data into the table. Here is the problem I just need a simple formula and I am trying to use this
=ACOS(COS(RADIANS(90-Lat1)) *COS(RADIANS(90-Lat2)) +SIN(RADIANS(90-Lat1)) *SIN(RADIANS(90-Lat2)) *COS(RADIANS(Long1-Long2))) *6371
The problem is visual basic does not have a math fuction for radians. How can I get around this problem with a simple formula.Thank you for you help,
John