Link to Google Maps?

J

Jeff Borden

Is there a way to set up a button to show a specific address on
maps.google.com?

I have a whole bunch of locations in a database, with the addresses broken
down in multiple fields. I'd like to have a button on the form for editing
the addresses to quickly pull up a Google map...

My data looks something like this:

Street Number: 1234
Street Name: Main St.
City: Vancouver
Province: BC
 
D

Daniel Pineault

Ye, it can be done. If you use google maps you'll notice that once you query
the system it create a very straight forward url based on the address
specified. thus it is just a question of doing the same and sending it to a
browser. Anyways, here are a few posts on the subject

http://www.microsoft.com/office/com...&p=1&tid=3918ac7d-aa88-475d-9a10-30a40a3c92a7

http://www.microsoft.com/office/com...&p=1&tid=f9d51939-ae4b-402c-a12a-ade81523a47b

http://www.microsoft.com/office/com...&p=1&tid=4c4f821c-eac7-4da0-ab8d-9bfe203d22b8
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
J

Jeff Borden

Thanks for the info Daniel.

Before I got your reply, I found some info on the Follow method, then got
this to work rather nicely for my needs:

Private Sub MapIt_Click()
On Error GoTo Err_MapIt_Click
Dim strInput As String
Dim ctl As CommandButton

On Error GoTo Err_MapIt_Click

Set ctl = Me!MapIt
With ctl
.HyperlinkAddress =
"http://maps.google.com/maps?f=q&hl=en&geocode=&q=" & _
[Forms]![frm_Properties]![Street Number] & "+" & _
[Forms]![frm_Properties]![Street Name] & ",+" & _
[Forms]![frm_Properties]![City] & ",+bc"
.Hyperlink.Follow
End With

Exit_MapIt_Click:
Exit Sub

Err_MapIt_Click:
MsgBox Err.Description
Resume Exit_MapIt_Click

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top