I have an Access database that has an ActiveX control on a form that displays a map from Microsoft Mappoint when it opens. However, the code I have obtained only opens the default Mappoint map and I want to open and display a map that already has routes on it. My code is:
Option Compare Database
Dim objMap As MapPoint.Map
Dim objPin As MapPoint.Pushpin
Sub Form_Load()
Set objMap = MPC.NewMap(geoMapNorthAmerica)
MPC.Toolbars.Item("Navigation"
.Visible = True
'This is done in the Form_Load so that the DataSets(1).Delete does not bomb in Form_Current the first time it is run
Set objPin = objMap.AddPushpin(objMap.FindAddressResults(Me!Address, Me!City, , Me!State, Me!Zip)(1))
For Each objPlaceCat In objMap.PlaceCategories
objPlaceCat.Visible = False
Next
End Sub
Does anyone know the syntax to use to open or set the object, for example, c:\My Documents\My Map
Thanks for your help!
Option Compare Database
Dim objMap As MapPoint.Map
Dim objPin As MapPoint.Pushpin
Sub Form_Load()
Set objMap = MPC.NewMap(geoMapNorthAmerica)
MPC.Toolbars.Item("Navigation"
'This is done in the Form_Load so that the DataSets(1).Delete does not bomb in Form_Current the first time it is run
Set objPin = objMap.AddPushpin(objMap.FindAddressResults(Me!Address, Me!City, , Me!State, Me!Zip)(1))
For Each objPlaceCat In objMap.PlaceCategories
objPlaceCat.Visible = False
Next
End Sub
Does anyone know the syntax to use to open or set the object, for example, c:\My Documents\My Map
Thanks for your help!