MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




MappointCopntrol in AccessXP

This is a discussion on MappointCopntrol in AccessXP within the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 02-21-2006
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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 ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 02-22-2006
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 02-23-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 02-24-2006
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 02-24-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 02-26-2006
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 02-26-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Hi Ralle,

Good that it works for you. Dont drink too much
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
accessxp, mappointcopntrol


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/mappointcopntrol-accessxp-4782.html

Posted By For Type Date
MetaGer, Suche nach: Objekt OpenMap This thread Refback 02-12-2007 03:42 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 12:28 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54