Link from Microsoft Access to Google Earth

1,431 views
Skip to first unread message

PhilipGabe

unread,
Jan 23, 2007, 9:28:57 AM1/23/07
to KML Discussions
I have a MS Access database that contains the Latitude and Longitude of certain locations (water & wastewater plants in the US). I'd like to build a link (button, I think) on a database form that initiates Google Earth and zooms to the coordinates of the current record. I suspect KML code is the way to do this, but am not sure. Has anyone done this already? If so, I would appreciate your help.

ManoM

unread,
Jan 23, 2007, 12:51:57 PM1/23/07
to KML Discussions
Hi Phillip,

You could do this using Visual Basic for Applications, the scripting back end of Microsoft Office. You would need to code the form to capture the latitude/longitude, create a KML file on the fly, save it, and then use the shell to open the file.

If you're looking for more direct control, you probably want to look at the COM API, using Visual Basic or VBA (I'm not sure if VBA would allow you to do this).

ManoM

simon_a

unread,
Jan 28, 2007, 6:02:16 PM1/28/07
to KML Discussions
Hello Philip,

Welcome to the GE Community!

I've not done this in Access but I have just done it with Excel:
http://bbs.keyhole.com/ubb/showthreaded.php/Cat/0/Number/774351

The same things will apply with Access - just with a button on a form kicking off the macro, as ManoM says, rather than clicking on the cell in this example.



Cheers,

Simon.
Reply all
Reply to author
Forward
0 new messages