Maps using address from form (preferably using MS MapPoint)

M

magmike

Does anyone have experience with sending and address from a record (while
working in a form of course) to Microsoft's MapPoint software?

If so, how about incorporating a static starting point (such as my office
address) for directions?

Currently I have been using just a text box that uses yahoo's mapping url
syntax (see below) with the Trim function to create directions, but I
really like mappoint's setup, options and functions.

Additionally, considering that the mappoint option isn't feasible, if
someone could help me incorporate my current method into a command button
that would also open the browser with this address, that would also be
acceptable. (I currently copy the text of the text box and paste it - i
can't get it to work setting the box as a hyperlink)

example:
=Trim("maps.yahoo.com/py/ddResults.py?Pyt=Tmap&tarname=&tardesc=&osd=&newname=&newdesc=&dsd=&newHash=&newTHash=&newErr=&newTErr=&newFL=Use+Address+Below&newaddr=555+MyOfficeAddress+Ln&newcsz=Chattanooga+Tn+37416&newcountry=us&newTFL=Use+Address+Below&newtaddr="
& [address] & "&newtcsz=" & [zipcode] &
"&newtcountry=us&Submit=Get+Directions")

Thanks in advance!
 
M

Michel Walsh

Hi,


I didn't use the address, but the Longitute/Latitude, as in the crude
example:


===============
Dim objApp As As MapPoint.Application

---------------------------

Public Sub cmdMapPoint(StartingLatitude As Double, StartingLongitude As
Double, _
EndingLatitude As Double, EndingLongitude As Double)

Dim objLoc(1 To 2) As MapPoint.Location

If Not objApp Is Nothing Then
Set objApp = Nothing
End If

Set objApp = New MapPoint.Application
With objApp
.Caption = "+Demo+"
.PaneState = geoPaneNone
.Units = geoKm

Set objLoc(1) = .ActiveMap.GetLocation(StartingLatitude,
StartingLongitude, 5)
Set objLoc(2) = .ActiveMap.GetLocation(EndingLatitude,
EndingLongitude, 5)
.Visible = True
DoEvents

objLoc(2).Goto
With .ActiveMap.ActiveRoute
.Clear
.Waypoints.Add objLoc(1), "Starting, "
.Waypoints.Add objLoc(2), " Destination"
.Calculate

End With
.ActiveMap.Saved = True

End With

End Sub
====================

cmdMapPoint 44, -70, 42, -75
 
M

Michel Walsh

Hi,


and note you can use the Location Sensor tool to get Longitude/Latitude.


Vanderghast, Access MVP
 

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

Similar Threads


Top