MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




Find Record in Dataset from selected Pushpin

This is a discussion on Find Record in Dataset from selected Pushpin within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I've imported a dataset from a textfile and show it as pushpins in the map. So far everything works ...


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

Today's Posts Twitter Feed 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 09-11-2003
Junior Member
White Belt
 
Join Date: Sep 2003
Posts: 3
Find Record in Dataset from selected Pushpin

Hi,

I've imported a dataset from a textfile and show it as pushpins in the map. So far everything works just fine. From the textfile I also imported a field wich contains the GUID for this record. I set the type for this field to geoFieldData.
Now: If the user selects a pushpin, I get the event and the pushpinobject. This also works just fine. What I need is to find the matching record in the dataset, so that I would get the GUID which was imported with this pushpin.
Could anyone please help!?
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 09-11-2003
Junior Member
White Belt
 
Join Date: Sep 2003
Posts: 3


Found the answer my self.
From the pushpinobject you use the parent-property to get the dataset. On this dataset you use the QueryAllRecords-methode to get a mappoint recordset. On this recordset you use the MoveToPushpin-methode and you'll be on the record to this pushpin and access all fields that have been imported.

Private Sub mMap_SelectionChange(ByVal pNewSelection As Object, ByVal pOldSelection As Object)
If TypeName(pNewSelection) = "Pushpin" Then
Dim pP As Pushpin
Set pP = pNewSelection
Dim pDS As DataSet
Set pDS = pP.Parent
Dim pRS As MapPointCtl.Recordset
Set pRS = pDS.QueryAllRecords
pRS.MoveToPushpin pP
If Not pRS.EOF Then
Debug.Print "Found: " + pRS.Fields(6).Value
RaiseEvent FilterSelection("ID = '" + pRS.Fields(6).Value + "'")
End If
End If
End Sub
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
dataset, find, pushpin, record, selected


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
find streets in a selected area Anonymous MapPoint 2006/2009 Discussion 1 01-11-2009 07:05 PM
Data Associated With Selected Pushpin Steve Wenck MapPoint 2006/2009 Discussion 1 08-12-2004 03:03 PM
Detecting the currently selected pushpin daxydoggie MapPoint 2006/2009 Discussion 2 11-19-2003 03:57 AM
Find Nearby Pushpin in dataset Dazzer Products: Pushpin Tool, Single State Mapper 1 10-16-2003 03:05 PM
PUSHPIN RECORD LIMIT gsc1ugs Products: Pushpin Tool, Single State Mapper 2 03-07-2003 10:00 AM


All times are GMT -5. The time now is 02:23 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Algarve Holiday
Portuguese all year round sunshine is some of what awaits you if you choose the Algarve holiday option through UlookUbook!



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 55 56 57 58 59