Dear all, Many thanks for the help I received on this one, I finally got around to trying out the solutions this morning! The ones from both Jacques and Keith Campbell solved my problem. Thanks again and for reference Jacques solution is included below, with my initial question posted below that. Regards, Dave ------- Forwarded message follows ------- From: "Jacques Paris" <[EMAIL PROTECTED]> To: "David Eagle (WSA Cambridge)" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: RE: MI-L Auto calc distance Date sent: Thu, 26 Oct 2000 07:04:22 -0400 Send reply to: "Jacques Paris" <[EMAIL PROTECTED]> The power of the MapBasic window to your help. 1 - add a new column to your "zones" table (called dist, type float) 2 - select your station in its layer 3 - write and run the following in the MBW (if you want any other unit of distance change the "km") dim x as float dim y as float x=centroidx(selection.obj) y=centroidy(selection.obj) update zones set dist=distance(x,y,centroidx(obj),centroidy(obj),"km") Good luck Jacques PARIS e-mail [EMAIL PROTECTED] For MapInfo support, see the Paris PC Consult enr. site at http://www.total.net/~rparis/gisproducts.htm For MapBasic questions see the J.Paris site at http://www.total.net/~jakesp/index.htm -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of David Eagle (WSA Cambridge) Sent: October 26, 2000 5:32 AM To: [EMAIL PROTECTED] Subject: MI-L Auto calc distance Listers, I have a table of adjacent zones (72 in total) which mark out certain areas of a city. I also have a railway station positioned on another table overlaying that. I want to calculate the straightline distance from the centroid of each zone to the train station and append this figure to the table of zones. Can anyone give me any pointers please? Many thanks, Dave _________________________________________________________ David A. Eagle WS Atkins Consultants - East Anglia Wellbrook Court, Girton Road, Cambridge, CB3 0NA. Direct Dial Tel: (01223) 814090, Fax: (01223) 277529 E-Mail: [EMAIL PROTECTED] _______________________________________________________________________ List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MapInfo-L" in the message body. _______________________________________________________________________ List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MapInfo-L" in the message body. ------- End of forwarded message ------- _________________________________________________________ David A. Eagle WS Atkins Consultants - East Anglia Wellbrook Court, Girton Road, Cambridge, CB3 0NA. Direct Dial Tel: (01223) 814090, Fax: (01223) 277529 E-Mail: [EMAIL PROTECTED] _______________________________________________________________________ List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MapInfo-L" in the message body.