Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| MappointCopntrol in AccessXP 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
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 |
| |||
|
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 ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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 |
| |||
|
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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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"; Code: mp.ActiveMap.PrintOut("",
"",
1,
GeoPrintArea.geoPrintDirections,
GeoPrintQuality.geoPrintQualityNormal,
GeoPrintOrientation.geoPrintAuto,
false, false, false, false);
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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 |
| |||
|
Hi Ralle, Good that it works for you. Dont drink too much
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| accessxp, mappointcopntrol |
| ||||
| 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 | |
| |