Art
You will need to add a browser control for the map. I wouldn't do it on a continuous form. It would probably take forever to load. I suggest a pop-up single form.
The code should be in a standard module.
Bill
--- In MS_Access_Professionals@yahoogroups.com, Art Lorenzini <dbalorenzini@...> wrote:
>
> Where would I put this code? My addresses are being pulled from a subform which is a continuous form. Do I add some sort of object to it?
>
>
> With Warm Regards,
>
> Arthur D. Lorenzini
> IT System Manager
> Cheyenne River Housing Authority
> Wk.(605)964-4265Â Ext. 130
> Fax (605)964-1070
> alorenzini@...
> âOnly those who will risk going too far can possibly find out how far one can go.â
>
>
> ________________________________
> From: Bill Mosca <wrmosca@...>
> To: MS_Access_Professionals@yahoogroups.com
> Sent: Tuesday, July 2, 2013 4:35 PM
> Subject: [MS_AccessPros] Re: Google Maps and Access
>
> Â
>
>
> Art - I got this a long time ago. Can't find the source.
>
> Sub sMapQuest(strAddress As String, strCity As String, strState As String, strZipCode As String)
> 'Purpose : Show map of given address.
> 'DateTime : 9/17/2008 09:31
> 'Author : Rob Shuster
> 'Requires : Internet Explorer
> Dim strURL As String
> Dim ie As Object
>
> If InStr(1, strAddress, "#") <> 0 Then 'Remove everything after # - mapquest does not like
> strAddress = Left(strAddress, InStr(1, strAddress, "#") - 2)
> End If
>
> Do While IsNumeric(Nz(Right(strAddress, 1), 0)) 'remove any righthand numbers/spaces - mapquest does not like
> strAddress = Left(strAddress, Len(strAddress) - 1)
> Loop
>
> strAddress = Replace(strAddress, " ", "+") 'Convert spaces to +
> strCity = Replace(strCity, " ", "+")
> strState = Replace(strState, " ", "+")
>
> strURL = "http://www.mapquest.com/maps/map.adp?country=US&addtohistory=" 'build URL
> strURL = strURL + "&address=" + strAddress
> strURL = strURL + "&city=" + strCity
> strURL = strURL + "&state=" + strState
> strURL = strURL + "&zipcode=" + strZipCode
> strURL = strURL + "&homesubmit=Get+Map"
>
> Set ie = CreateObject("InternetExplorer.Application")
>
> ie.Navigate strURL
> ie.Visible = True
>
> End Sub
>
> Regards,
> Bill Mosca, Founder - MS_Access_Professionals
> http://www.thatlldoit.com/
> Microsoft Office Access MVP
> https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
> My nothing-to-do-with-Access blog
> http://wrmosca.wordpress.com/
>
> --- In mailto:MS_Access_Professionals%40yahoogroups.com, "Art" <dbalorenzini@> wrote:
> >
> > Is there a way to incorporate a google map in a form based on address fields (address, city, state, zip) in a table?
> > So basically I would like to see the following on my form;
> >
> > Work
> > 123 Main Street
> > Sioux Falls, SD 57103
> >
> > [Map Here]
> >
> > Home
> > 456 Maple Street
> > Sioux Falls, SD 57103
> >
> > [Map Here]
> >
> > Any ideas would be great.
> >
> > Thank you
> >
> > Art Lorenzini
> > Sioux Falls, SD
> >
>
>
>
>
> [Non-text portions of this message have been removed]
>
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (4) |
Tidak ada komentar:
Posting Komentar