MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




pushpin event in vba access

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 ...


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 Thread Tools Display Modes
  #1 (permalink)  
Old 07-14-2005
Junior Member
White Belt
 
Join Date: Jul 2005
Posts: 3
pushpin event in vba access

Hi,

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
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 07-19-2005
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
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
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 08-04-2005
Junior Member
White Belt
 
Join Date: Jul 2005
Posts: 3
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
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 08-04-2005
calv1ns's Avatar
Member
Green Belt
 
Join Date: Mar 2005
Posts: 91
Try this...

Hey mimo

If I understand your problem maybe try this:

Open the Module in Access that contains the code John gave you. Then in the VBA Editor Click:

Tools> References...

Search through the list and select:

Microsoft MapPoint 11.0 Object Library (North America)

If it is not in the list, browse for the file:

C:\Program Files\Microsoft MapPoint\MPNA82.tlb

Note change the drive and directory to suit where you installed MP 2004.

Hope this helps
Ciao,
__________________
Calv1ns
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 08-05-2005
Junior Member
White Belt
 
Join Date: Jul 2005
Posts: 3
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
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
access, event, pushpin, vba


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

Similar Threads

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


All times are GMT -5. The time now is 10:32 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