I downloaded the following code from this site, which allows me to map each address individually in an Access form. I've tried to figure out how to modify it so that all addresses appear on the map at the same time but have been unsuccessful.
Can someone tell me how to tweak this code so that I can map all addresses at the same time?
Thanks so much!
Mike
-----------------------
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!Add ress,
Me!City, , Me!State, Me!Zip)(1))
For Each objPlaceCat In objMap.PlaceCategories
objPlaceCat.Visible = False
Next
End Sub
Private Sub Form_Current()
objMap.DataSets(1).Delete
Set objPin = objMap.AddPushpin(objMap.FindAddressResults(Me!Add ress,
Me!City, , Me!State, Me!Zip)(1))
objPin.Symbol = 57
objMap.DataSets.ZoomTo
End Sub
Private Sub Form_Unload(Cancel As Integer)
objMap.Saved = True
End Sub