Community of VE/MapPoint Users and Developers
This is a discussion on pushpin event in vba access within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, i'm trying to connect access2000 and mappoint 2004 with vba. In my Mappoint are pushpins with customer Id numbers ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| pushpin event in vba access i'm trying to connect access2000 and mappoint 2004 with vba. In my Mappoint are pushpins with customer Id numbers from access. When i click on the pushpin, i would be happy if i could somehow detect this in access and read out the customer id to open a formular with this customer in access. thanks mimo123 |
| ||||
|
For this example: in access add an activex object (Microsoft MapPoint Control 11.0) to form1 and add this code. Run the form and add a pushpin from the drawing toolbar. add a shape from the drawing toolbar. Select different items. When you select the pushpin the message box appears. Hope this helps... Code: Option Compare Database
Dim objMap As MapPoint.Map
Dim objPin As MapPoint.Pushpin
Sub Form_Load()
Set objMap = MappointControl1.NewMap(geoMapNorthAmerica)
MappointControl1.Toolbars.Item("Navigation").Visible = True
MappointControl1.Toolbars.Item("Drawing").Visible = 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
__________________ John http://www.support-pc.com Order MapPoint 2006 Here https://secure.mp2kmag.com/?refer=support-PC |
| |||
|
Thanks, i tried several times to insert mappoint control 11 to form1 and to add your code. It doesn't work. When i open the form the error "objekt is missing" and when i click into the activex in the form error "ols server is not installed" So i tried some other things. No succes. But in the mappoint helpfile mappoint control 11 is only for vb not vba. Can I get the selectionchange event in a mappoint application running "free"? thanks mimo123 |
| |||
|
Thanks calv1ns, re-thought your tip and checked, the mappoint library was installed. The problem seem's to be, that Microsoft MapPoint Control 11.0 is only working in vb not in vba (checked again in online help). Has anyone an idea, how i can teach access to recognise selectionChange events in vba? Thanks and nice weekend mimo |
![]() |
| Tags |
| access, event, pushpin, vba |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SelectionChange event | Yazzy | MapPoint 2006/2009 Discussion | 0 | 05-16-2006 10:25 AM |
| Where is the Quit event? | Anonymous | MapPoint 2006/2009 Discussion | 3 | 04-08-2005 08:36 AM |
| Event get called when pushpin is deleted | vidyakulkarni | MapPoint 2006/2009 Discussion | 1 | 10-25-2004 10:43 PM |
| Capture the Pushpin move event | Maverick | MapPoint 2006/2009 Discussion | 1 | 04-14-2003 02:34 AM |
| VB6 + ACCESS : Center to a pushpin and other things... | Anonymous | MapPoint 2006/2009 Discussion | 0 | 09-05-2002 11:40 AM |