I am currently working with the MapPoint 2002 Tria....

This is a discussion on I am currently working with the MapPoint 2002 Tria.... within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am currently working with the MapPoint 2002 Trial. I want to utilize MapPoint in an Access database. I can ...

I am currently working with the MapPoint 2002 Trial. I want to utilize MapPoint in an Access database. I can add a MapPoint control to the form and create buttons to do different functions. However, after testing the form, if I go back to design view, I get a message saying "There is no control in this object." and the MapPoint control on my form gets deleted. Any help would be appreciated.

Set oApp = CreateObject("Mappoint.Application")
Set oMap = oApp.OpenMap("c:\matt\renault\CUstom Territories.ptm") 'Create a new map

End Sub
Sub ReloadMap(PCode)

Dim oPush As Object, oLoc As Object

Set oLoc = oMap.Find(PCode)

'get address from PostCode

If Not oLoc Is Nothing Then 'Check to see if the first address was found.
Set oPush = oMap.AddPushpin(oLoc) 'Place a pushpin on the map
'add some more details to the pushpin and display the balloon
oPush.BalloonState = geoDisplayBalloon
oMap.ZoomIn
oPush.Goto
oMap.Saved = True
'Zoom in so that the entire map with directions is viewed
oMap.CopyMap 'Copy the map to the clipboard
img.Visible = True 'Change the image place holder in the Access form to visible
img.Action = acOLEPaste
End If

End Sub

Sub RefreshMap()
oMap.Saved = True
'Zoom in so that the entire map with directions is viewed
oMap.CopyMap 'Copy the map to the clipboard
img.Visible = True 'Change the image place holder in the Access form to visible
img.Action = acOLEPaste
End Sub