Community of MapPoint and Virtual Earth Users and Developers
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 ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Find Record in Dataset from selected Pushpin 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!? |
| |||
| 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 |
![]() |
| Tags |
| dataset, find, pushpin, record, selected |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |
Algarve Holiday
Portuguese all year round sunshine is some of what awaits you if you choose the Algarve holiday option through UlookUbook!