Create Function LatLonDistKM( @Lat1 Float, @Lon1 Float, @Lat2 Float, @Lon2 Float) Returns Float/* Faster way to calculate distance in kilometers using Latitude & Longitude. This is accurate in KM to about 4.5 decimal places, except for very small distances.NOTE: 57.295779513082323 = 180.0 / PI (converts Lat/Lon degrees to spherical radians)Ref: The formula is derived from the Spherical Law of Cosines, --RBarryYoung, 31-Jan-2009, KM: 17-Feb-2009*/ AsBegin Return 6357.0*acos( sin(@Lat1/57.295779513082323) * sin(@Lat2/57.295779513082323) + cos(@Lat1/57.295779513082323) * cos(@Lat2/57.295779513082323) * cos((@Lon2-@Lon1)/57.295779513082323))End