Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

Find Record in Dataset from selected Pushpin

This is a discussion on Find Record in Dataset from selected Pushpin within the MapPoint Desktop 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 ...

  1. #1
    neomoon is offline 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!?

  2. #2
    neomoon is offline 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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. find streets in a selected area
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-11-2009, 08:05 PM
  2. Data Associated With Selected Pushpin
    By Steve Wenck in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-12-2004, 04:03 PM
  3. Detecting the currently selected pushpin
    By daxydoggie in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 11-19-2003, 04:57 AM
  4. Find Nearby Pushpin in dataset
    By Dazzer in forum Products: Pushpin Tool, Single State Mapper
    Replies: 1
    Last Post: 10-16-2003, 04:05 PM
  5. PUSHPIN RECORD LIMIT
    By gsc1ugs in forum Products: Pushpin Tool, Single State Mapper
    Replies: 2
    Last Post: 03-07-2003, 11:00 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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