Guys ,
the below code is a VB project working woth mappoint. My probelm is
with the very last section of code not working ----'Set oShp =
objMap.Shapes.A ddPolyline(objL oc2).
Im not sure i have setup the array objloc2 correclty?????? ?
can anyone help?
Sub MapSelectedProp erties()
'Map the selected properties
' On Error GoTo MapSelectedProp erties_Err_Exit
Dim db As Database
Dim rstProps As Recordset
Dim objLoc As MapPoint.Locati on
Dim objLoc2() As MapPoint.Locati on
Dim objMap As MapPoint.Map
Dim objPushpin As MapPoint.Pushpi n
Dim strMsg As String
Dim i As Integer
i = 0
Set db = CurrentDb()
'Load the selected properties into a recordset
Set rstProps = db.OpenRecordse t("SELECT * FROM tblProperties WHERE
ysnSelected = Yes;")
'Make sure at least one property was selected
If rstProps.Record Count 0 Then
LoadMap()
While Not rstProps.EOF
i = i + 1
Set objLoc = objMap.FindAddr essResults(rstP rops!strStreet,
rstProps!strCit y, rstProps!strSta te, rstProps!strPos talCode)(1)
Set objPushpin = objMap.AddPushp in(objLoc, rstProps!strStr eet)
rstProps.MoveNe xt
Wend
------------------------------------------------------------------------------------------------------
While Not rstProps.EOF
i = i + 1
Set objLoc2(i) = objMap.FindAddr essResults(rstP rops!strStreet,
rstProps!strCit y, rstProps!strSta te, rstProps!strPos talCode)(1)
rstProps.MoveNe xt
Wend
Dim oShp As MapPoint.Shape
Set oShp = objMap.Shapes.A ddPolyline(objL oc2)
the below code is a VB project working woth mappoint. My probelm is
with the very last section of code not working ----'Set oShp =
objMap.Shapes.A ddPolyline(objL oc2).
Im not sure i have setup the array objloc2 correclty?????? ?
can anyone help?
Sub MapSelectedProp erties()
'Map the selected properties
' On Error GoTo MapSelectedProp erties_Err_Exit
Dim db As Database
Dim rstProps As Recordset
Dim objLoc As MapPoint.Locati on
Dim objLoc2() As MapPoint.Locati on
Dim objMap As MapPoint.Map
Dim objPushpin As MapPoint.Pushpi n
Dim strMsg As String
Dim i As Integer
i = 0
Set db = CurrentDb()
'Load the selected properties into a recordset
Set rstProps = db.OpenRecordse t("SELECT * FROM tblProperties WHERE
ysnSelected = Yes;")
'Make sure at least one property was selected
If rstProps.Record Count 0 Then
LoadMap()
While Not rstProps.EOF
i = i + 1
Set objLoc = objMap.FindAddr essResults(rstP rops!strStreet,
rstProps!strCit y, rstProps!strSta te, rstProps!strPos talCode)(1)
Set objPushpin = objMap.AddPushp in(objLoc, rstProps!strStr eet)
rstProps.MoveNe xt
Wend
------------------------------------------------------------------------------------------------------
While Not rstProps.EOF
i = i + 1
Set objLoc2(i) = objMap.FindAddr essResults(rstP rops!strStreet,
rstProps!strCit y, rstProps!strSta te, rstProps!strPos talCode)(1)
rstProps.MoveNe xt
Wend
Dim oShp As MapPoint.Shape
Set oShp = objMap.Shapes.A ddPolyline(objL oc2)