PS.
Search your hard drive for a Help file named Mappoint.chm. The last entry on
the Contents tab reads "Programming Information". Here is an example that
uses late bound code, to instantiate MapPoint as a seperate application (ie.
not using the ActiveX control on a form). You might find this method more to
your liking, because it allows you to trap and gracefully handle error 426,
in the event that a user does not have MapPoint installed:
Option Compare Database
Option Explicit
Dim objApp As MapPoint.Application
Dim objMap As MapPoint.Map
Private Sub Form_Load()
'Set up the application
Set objApp = CreateObject("mappoint.application")
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True
End Sub
Private Sub Command1_Click()
'Pan the map
objMap.Pan geoNorth
End Sub
Note:
The example from the Help file actually included this:
Dim WithEvents objApp As MapPoint.Application
Dim WithEvents objMap As MapPoint.Map
but these declarations result in a compile error in Access. I removed the
WithEvents, and the code compiled (and ran) just fine.
Tom Wickerath
Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html