spacer1
spacer2 1_1 1_2
2_1
 Subscribe
 The MP2K Update!
 
 
 
 Magazine
Front Cover
What's New
Articles
News
Sample Data
Gallery
Advertise
About
 Features
MapPoint 2013
Press Releases
MapPoint Forums
Companies
Link to MP2Kmag
Wish List
MapPoint Trial
Authors
 Earlier Content
Past News Items
Past What's New Announcements
 Sponsors
 Order

MapPoint 2013

Programming MapPoint in .NET

MapPoint Book

  Spatial Community
SVG Tutorials
MapPoint

Map Visitors

  MAPPOINT Q & A  

Top | Post New Question | Read All | MP2K Asks Microsoft

701 Greg - June 3, 2002

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.

Answers:
June 6, 2002
I'm not familiar with this issue, what version of Access are you using? The trial is fully-functional so there shouldn't be an issue with that.

June 7, 2002
I'm using Access 2002 on a Windows XP machine. I've tried it with and without service pack 1 for Office XP installed.

June 11, 2002
Greg, I had the same problem. Have you overcome it yet? I used a code sample which works with an image control on the Access form, pasting the contents of a MapPoint Object into the image. Email me for further info or to share progress at wellermatt@hotmail.com. Code Sample (sorry it is untidy!): Private Sub Form_Load() SetObjects ReloadMap ("None") End Sub Sub SetObjects() 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 Private Sub cmdPanEast_Click() oMap.Pan (geoEast) RefreshMap End Sub Private Sub cmdPanNorth_Click() oMap.Pan (geoNorth) RefreshMap End Sub Private Sub cmdPanSouth_Click() oMap.Pan (geoSouth) RefreshMap End Sub Private Sub cmdPanWest_Click() oMap.Pan (geoWest) RefreshMap End Sub Private Sub cmdZoomIn_Click() oMap.ZoomIn RefreshMap End Sub Private Sub cmdZoomOut_Click() oMap.ZoomOut RefreshMap End Sub

June 23, 2002
Me too. I have to be careful to make code changes and save before returning to the form then close the form and then reopen to test.

Post New Answer / Follow-up


Google
 
MP2Kmag Internet


 Recent Discussion
 Resources


Want Your Site To Appear Here?

   © 1999-2012 MP2K. Questions and comments to: website@mp2kmag.com
  Microsoft and MapPoint 2002/2004/2006/2009/2010/2011/2013 are either trademarks or registered trademarks of Microsoft.