Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSAccess link to Google Maps and Search

532 views
Skip to first unread message

Mark

unread,
Feb 10, 2012, 4:14:28 PM2/10/12
to
As has been said is several spots, there is not an easy way (and maybe
not even a hard way) to place a google maps image on your form.

However, here is a very easy way to create a hyperlink to google maps.
This assumes a 2 line address in the form, but can handle a 3line
address with a name as well. Not sure how it would work with two
street lines.....

100 Hill Street
Chicago, IL 25184


Dim strLinkUrl As String ' address of provider passed to Google maps
in the URL
Dim strPath As String ' Google maps URL
Dim strAddr As String ' used to create address string

' this is the URL to Google maps
strPath = "http://maps.google.com/maps?q="

'For google search use the line below
'strPath = "http://www.google.com/search?q="

' convert any line feeds to spaces
strAddr = Replace(Me.Address, vbLf, " ")

'remove any double spaces
strAddr = Replace(strAddr, " ", " ")

'convert spaces to +'s
strAddr = Replace(strAddr, " ", "+")

combine with url
strLinkUrl = strPath & straddr

'open browser with link
Application.FollowHyperlink strLinkUrl

Neil

unread,
Feb 24, 2012, 9:27:24 PM2/24/12
to
In Access 2010 you can use the new web browser control and just set the URL
in the control That will give Google Maps within your Access form, rather
than opening an external browser!

"Mark" <field...@gmail.com> wrote in message
news:b0cd6509-3852-4183...@p13g2000yqd.googlegroups.com...
0 new messages