I need to connect to Streets and trips from access and looked around the various discussion forums but invain. I am not new to Access but am comparatively new to accessing/merging other programs through access.
What i am looking for is to be able to start the Streets and trips application and feed it the data that i need to map (pushpins) as done for mappoint in the code here:
Dim objApp As MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc As MapPoint.Location
Dim objPushpin as MapPoint.Pushpin
Private Sub Command1_Click()
' Map a point in the OLE control.
' Get the application object from the OLE control.
Set objApp = OLE1.object.Application
' Put the OLE control in Edit mode.
OLE1.DoVerb (1)
' Get the current map.
Set objMap = objApp.ActiveMap
' Find an address.
Set objLoc = objMap.FindAddress("One Microsoft Way", "Redmond", "Washington", "98052", geoCountryUnitedStates)
' Set a pushpin at the address.
Set objPushpin = objMap.AddPushpin(objLoc, "Microsoft")
' Browse to the pushpin.
objPushpin.GoTo
' Highlight the pushpin.
objPushpin.Highlight = True
' Set the focus back to the command button.
' Take OLE control out of Edit mode.
Command1.SetFocus
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
' Clear variables before you unload the form.
Set objMap = Nothing
Set objApp = Nothing
Set objLoc = Nothing
Set objPushpin = Nothing
End Sub
I got this code from http://support.microsoft.com/default.aspx?scid=kb;EN-US;277750
Could someone please provide me with some help. Thanks
What i am looking for is to be able to start the Streets and trips application and feed it the data that i need to map (pushpins) as done for mappoint in the code here:
Dim objApp As MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc As MapPoint.Location
Dim objPushpin as MapPoint.Pushpin
Private Sub Command1_Click()
' Map a point in the OLE control.
' Get the application object from the OLE control.
Set objApp = OLE1.object.Application
' Put the OLE control in Edit mode.
OLE1.DoVerb (1)
' Get the current map.
Set objMap = objApp.ActiveMap
' Find an address.
Set objLoc = objMap.FindAddress("One Microsoft Way", "Redmond", "Washington", "98052", geoCountryUnitedStates)
' Set a pushpin at the address.
Set objPushpin = objMap.AddPushpin(objLoc, "Microsoft")
' Browse to the pushpin.
objPushpin.GoTo
' Highlight the pushpin.
objPushpin.Highlight = True
' Set the focus back to the command button.
' Take OLE control out of Edit mode.
Command1.SetFocus
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
' Clear variables before you unload the form.
Set objMap = Nothing
Set objApp = Nothing
Set objLoc = Nothing
Set objPushpin = Nothing
End Sub
I got this code from http://support.microsoft.com/default.aspx?scid=kb;EN-US;277750
Could someone please provide me with some help. Thanks