Hi the below code works fine.
however as i wont always know that the objloc array has 4
parameters...ho w can i modify this code so that the array is dynamic??
Sub MapSelectedProp erties()
Dim objLoc2(1 to 4) As MapPoint.Locati on
Dim i As Integer
i = 0
Set Recordset = CurrentDb.OpenR ecordset("SELEC T * FROM
tblProperties;" )
If Recordset.Recor dCount 0 Then
While Not Recordset.EOF
i = i + 1
Set objLoc2(i) =
objMap.FindAddr essResults(Reco rdset!strStreet , Recordset!strCi ty,
Recordset!strSt ate, Recordset!strPo stalCode)(1)
Set objPin = objMap.AddPushp in(objLoc2(i), Recordset!strSt reet)
Recordset.MoveN ext
Wend
End If
' objMap.Shapes.A ddPolyline objLoc2
however as i wont always know that the objloc array has 4
parameters...ho w can i modify this code so that the array is dynamic??
Sub MapSelectedProp erties()
Dim objLoc2(1 to 4) As MapPoint.Locati on
Dim i As Integer
i = 0
Set Recordset = CurrentDb.OpenR ecordset("SELEC T * FROM
tblProperties;" )
If Recordset.Recor dCount 0 Then
While Not Recordset.EOF
i = i + 1
Set objLoc2(i) =
objMap.FindAddr essResults(Reco rdset!strStreet , Recordset!strCi ty,
Recordset!strSt ate, Recordset!strPo stalCode)(1)
Set objPin = objMap.AddPushp in(objLoc2(i), Recordset!strSt reet)
Recordset.MoveN ext
Wend
End If
' objMap.Shapes.A ddPolyline objLoc2
Comment