Results 1 to 11 of 11
  1. #1
    Pgill is offline Novice
    Windows XP Access 2000
    Join Date
    Jul 2011
    Posts
    21

    Using Google Earth in Access


    Hi Guys,

    I would like to enter GPS coordinates into a form / table and by pushing a command button, open a screen that displays a google map or opens google earth at that coordinate..... Can someone please help me?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847

  3. #3
    Pgill is offline Novice
    Windows XP Access 2000
    Join Date
    Jul 2011
    Posts
    21
    Orange,
    Thanks for the reply.... Wow I never knew it would be so difficult to do..... I thought it would be much easier.... Umm it is scary well let me work at it and see what I can do.

    Thanks.

    Quote Originally Posted by orange View Post

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    I haven't worked with Google Earth, but I just happened to find that link a few days ago when doing some searching. It was the only site I found that had a sample database. I agree that it seems quite complex, and I'm sure there are others who have working code.

    A few years ago I did find a sample with Google maps where someone had code to identify things within a certain radius. I was working on a small project to see what companies (or their products/services) existed within a selected radius of a given postal code. I used the original code, without really understanding it, and placed some variables in the original code to identify the start point and the radius. I then set up that code as a function and just passed it parameters. Then did an application.FollowHyperlink (with the address) to open a new window with the proper map and radius.
    Please post any links or sample code as your project evolves. I'm sure it will be helpful to others and we can all learn. Good luck.

    Try a google search using these terms " google map polyline example" and you'll get some info on Maps.

  5. #5
    Pgill is offline Novice
    Windows XP Access 2000
    Join Date
    Jul 2011
    Posts
    21
    Thanks Orange, will keep all informed when I come right

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    Pgill,

    I responded to another Google Map question here
    https://www.accessforums.net/forms/g...html#post67126

    Not exactly what you were asking, but post your status. I may have more info.

  7. #7
    Pgill is offline Novice
    Windows XP Access 2000
    Join Date
    Jul 2011
    Posts
    21
    Hi Orange,
    Thanks for the code.... I have now taken a copy of it.... I solved my problem last night by creating a Kmz file and attaching it into my database.... Now if you see Kmz in a box, you can just double click it and it opens GoogleEarth.... It works well, and is great...

    Thanks so much for your help and all the others who gave me info, it is greatly appreciated.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    Pgill,
    Glad you got your stuff working. Can you post your KMZ and or links you used to resolve your issue?
    Thanks.

    Also, in the sample I gave at the other post, you can enter a LatLong and get a map also.

    eg. MyLatLong = "32.2194017,-110.9656253"
    StreetToGoogleMap (MyLatLong)

  9. #9
    Pgill is offline Novice
    Windows XP Access 2000
    Join Date
    Jul 2011
    Posts
    21
    Hi Orange....

    What I did was to go to a destination in GoogleEarth, and I created a "Placemark" which I saved onto my desktop.
    In my Database I created a "GPS Coordinate" field and set it to "OLE Object", In the Form I created a "Bound Object Frame" which I set to "Embedded" file.
    What I do is click on "Insert" and "Object" and then "Create from File" then "Browse" to the Kmz on my desktop. What it does is shows a "Kmz" icon in the frame..... When you double click the icon, GoogleEarth opens and takes you straight to the destination.
    This is great for what I need.
    I found this mainly from just playing around in a test base.... Is it the best way..... probably not, but it is accurate and quick to insert.

    Hope my description helps others....

  10. #10
    Join Date
    Sep 2011
    Posts
    1

    Using Google Maps in Access

    I have created a textbox (it happens to be Text70) on my form with control source
    =[coordinates]. Coordinates is the field in my database that has the lat and lon in the format 50.1235,-1.2345.
    Then I have another textbox (it happens to be Text64) with control source
    ="http://maps.google.com/maps?q=" & [Text70]
    You can also use [postcode] if that's in your database.
    Anyhow, by some means or other you have to produce a text string like
    "http://maps.google.com/maps?q=50.1235,-1.2345" or
    "http://maps.google.com/maps?q=AB12 3CD"
    Then you put a button on the form and in the "on click" event code builder you build

    Private Sub Command67_Click()
    Dim MyHyperlink As String
    Dim strGoogleLocation As String
    strGoogleLocation = Text64
    MyHyperlink = strGoogleLocation
    Application.FollowHyperlink MyHyperlink
    End Sub

  11. #11
    Pgill is offline Novice
    Windows XP Access 2000
    Join Date
    Jul 2011
    Posts
    21

    Thanks Graham

    Hi Graham,

    Thanks for the idea..... That sounds like something I was looking for thanks you so much, I will give it a try and see what happens. At the moment I am just importing a KLM file into the database.

    Regards
    Peter Gill

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access Google Map?
    By dev82 in forum Programming
    Replies: 2
    Last Post: 07-15-2011, 09:35 AM
  2. Access-to-Google Earth .. converting to KML
    By efleming in forum Import/Export Data
    Replies: 1
    Last Post: 06-03-2011, 01:43 PM
  3. Old way: Outlook...New way: Google mail
    By pdx834 in forum Access
    Replies: 1
    Last Post: 03-08-2011, 04:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums