A Google search of "PostCode Latitude" brings up at least one

reference to a publicly available file of the coordinates of areas

associated with UK Postal Codes. One could use these to calculate in-

line distances with code like this:

Const PI# = 3.14159265358979

' circumference in kilometers

Const Circumference# = 40123.648

Public Function GreatCircleDistance#( _

ByVal Latitude0#, ByVal Longitude0#, _

ByVal Latitude1#, ByVal Longitude1#)

On Error Resume Next

Dim Arc#

Dim CosArc#

If Latitude0 = Latitude1 And Longitude0 = Longitude1 Then

GreatCircleDistance = 0

Else

Latitude0 = Radians(Latitude0)

Longitude0 = Radians(Longitude0)

Latitude1 = Radians(Latitude1)

Longitude1 = Radians(Longitude1)

CosArc = (Sin(Latitude0) * Sin(Latitude1)) + _

(Cos(Latitude0) * Cos(Latitude1) * Cos(Longitude0 -

Longitude1))

Arc = Degrees(Atn(-CosArc / Sqr(-CosArc * CosArc + 1)) + 2 *

Atn(1))

GreatCircleDistance = Arc / 360 * Circumference

End If

End Function

Private Function Radians#(ByVal Degrees#)

Radians = PI * Degrees / 180

End Function

Private Function Degrees#(ByVal Radians#)

Degrees = Radians / PI * 180

End Function

On Nov 12, 11:26*am, comcraft1...@googlemail.com wrote:

I am planning an Access database for a Hotel chain with several hotels

all over the UK. The required functionality is as follows:

1. A client wants to know the nearest hotel/s to a specific location.

2. The db user keys in the client's postcode and the system returns

the three hotels nearest to them in a format similar to the following:

Distance form Postcode * *Hotel Name * * *Location * * *Tel

5.5 miles * * * * * * * * * * * * The Royal * * * * Bristol

01555 5551

123 miles * * * * * * * * * * * * The Regent * * *London * * * * *0207

557 5555

125 miles * * * * * * * * * * * * The Plaza * * * *London

0207 667 4444

Does any one know of a third party tool that will do this? All I need

is the bit that can take all of the Hotel postcodes (about 30) and

calculate the distance of each of them to the user entered postcode. I

can do the rest.

Thanks,

Paul