Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 8 of 8

MappointCopntrol in AccessXP

This is a discussion on MappointCopntrol in AccessXP within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, I'm trying to integrate a MappointControl Activx in my Access-Formular whith the following code: Code: Private Sub Form_Load() Dim ...

  1. #1
    Ralle2001 is offline Junior Member White Belt
    Join Date
    Feb 2006
    Posts
    5

    MappointCopntrol in AccessXP

    Hello,

    I'm trying to integrate a MappointControl Activx in my Access-Formular whith the following code:
    Code:
    Private Sub Form_Load()
    Dim apmap As MapPoint.Application
    Dim objMap As MapPoint.MAP
    Dim objPin As MapPoint.Pushpin
    
    
      Set objMap = MappointControl1.NewMap(2)
      MappointControl1.Toolbars.Item("Navigation").Visible = True
      MappointControl1.Toolbars.Item("Zeichnen").Visible = True
      
      objMap.Saved = True
    End Sub
    
    Private Sub MappointControl1_SelectionChange(ByVal pNewSelection As Object, ByVal pOldSelection As Object)
    
    If TypeOf pNewSelection Is Pushpin Then
        
            MsgBox pNewSelection.Name
            
        End If
    End Sub
    I found the code in this forum.
    For the first time everything was ok. I saw the map with all functions. While closing the form i got an error. Since this time I always get an error on openig the form: 'Objekt unterstützt diese Eigenschaft oder Methode nicht'
    I registerd 'Microsoft MapPoint 11.0 Object Library (Europe)'. Does enyone knows this problem?
    Thanks

    Ralle

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Can you find the offending line of code ? I dont know how, but I assume you have in VBA also an IDE that you can set to stop on an exception ?

  3. #3
    Ralle2001 is offline Junior Member White Belt
    Join Date
    Feb 2006
    Posts
    5
    Hi Wilfried,

    the Code stopped by itself in this line 'Set objMap = MappointControl1.NewMap(2)'.
    I don´t know why, but yesterday I made a new form and everything works fine, so for this time I can try do go on with my program.

    Sorry for my bad english.

    Ralle

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Can you try OpenMap ?
    Just to find out wheer it is wrong. Something seems messed up in registry.

    BTW your english is better than my German.

  5. #5
    Ralle2001 is offline Junior Member White Belt
    Join Date
    Feb 2006
    Posts
    5
    Hi Wilfried,

    the program works just right now.

    I'm calculating and optimizing a route in this formular. Do you know a method to print out the route-directions and the map?

    Thanks

    Ralle

  6. #6
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi Ralle,

    Good it works. What was the problem ? Because it maybe can benefit other users.

    For printing you have to enumerate the usable printers and give the printer to mappoint, or the direct name. For example:

    Code:
        mp.ActivePrinter = "\\\\MAIL\\HP LaserJet 1200 Series PCL 6";
    And call the regular print method. GeoPrintArea has also other options like Turn by Turn. Check also the latter 4 arguments.

    Code:
        mp.ActiveMap.PrintOut("", 
                              "", 
                              1,
                              GeoPrintArea.geoPrintDirections,
                              GeoPrintQuality.geoPrintQualityNormal,
                              GeoPrintOrientation.geoPrintAuto,
                              false, false, false, false);

  7. #7
    Ralle2001 is offline Junior Member White Belt
    Join Date
    Feb 2006
    Posts
    5
    Hi Wilfried,

    sorry about this late answer but in germany we have karneval and therefor we I've no time for computer.

    I don't know exactly where the problem came from. Always when I'm making a mistake in my program-code or sometimes while I'm only editing the form the mappoint-control daesn't works. Then I have to delete the mappoint-control and put a new one into my form, rename it into the old name and everything works fine again. It's a litle bit laborious but it works.

    The printout-methode is absolute wonderful. But it seems that there is no way to print out in preview-mode.

    Best wishes

    Ralle

  8. #8
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25