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
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Pushpin Names

This is a discussion on Pushpin Names within the MapPoint Desktop Discussion forums, part of the Map Forums category; Im trying to populate a listbox with the pushpin names, but it's not working out. Has anyone tried this before? ...

  1. #1
    Mudrover is offline Junior Member Yellow Belt
    Join Date
    Jan 2005
    Posts
    13

    Pushpin Names

    Im trying to populate a listbox with the pushpin names, but it's not working out. Has anyone tried this before? Any tips?

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Populate list box with pushpin names

    Here's what I did in VBA (Access):

    Set List = Me![Cardinal]
    List.RowSourceType = "Value List"
    Set rstListBox = objMap.DataSets.Item("Cardinal Directions").QueryAllRecords
    While Not rstListBox.EOF
    strList = strList & """" & rstListBox.Pushpin.Name & """" & ";"
    MsgBox "strList is " & strList
    rstListBox.MoveNext
    Wend
    intLength = Len(strList)
    List.RowSource = strList
    List.Requery

    The QueryAllRecords gets the info from the pushpin set. I'm using Access 2000, so I couldn't use AddItem to add the pushpin names to the list box, so I concatenated them into a value list instead. Hope this helps.

  4. #4
    Mudrover is offline Junior Member Yellow Belt
    Join Date
    Jan 2005
    Posts
    13
    Thanks Alexa, most if it makes sence, but I must be completely stupid, query's and I don't get along.

    Is there a VB6 article or write-up of this somewhere? I'm pulling my hair out over this simple little thing.

  5. #5
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Can you please tell what the problem is ? I think many people will help but I can not figure out what the problem is.

  6. #6
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Hey Wilfried,

    Unfortunately the workstation that has mappoint on it is at a different location and doesn't have web access, so next time I'll write down my problems exactly, sorry.

    But after reading this post...
    http://www.mp2kmag.com/mappoint/disc...hlight=listbox

    I think my problem is that I didn't understand DataSets, I think I do now. I need to query each of my pinsets separately. I'll take this post to the other location and try again. It'd be nice if there was a library of simple sample code like this for newbie's to learn from.

  7. #7
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Reading the document (the URL you posted) made me more clear what your problem was. Problem is I'm not (and many people here) english spoken. If I translate for example you original question then I read: "how to fill a listbox with names?". See? that's the difficult one

    good luck !

  8. #8
    Mudrover is offline Junior Member Yellow Belt
    Join Date
    Jan 2005
    Posts
    13
    Wilfried,

    English is my first language and I mess it up all the time.

    It is that simple. Just as you said:

    "how to fill a listbox with (pushpin)names?".
    I'm over thinking it and making it more difficult then it needs to be. Tomorrow I'll bring some of the code I have so far, but I just assume delete it, because I think its completely wrong and guiding me in the wrong direction.

    Sorry for being so difficult.

  9. #9
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    No youre not difficult. It is a question of language barrier. Please post your code but more important is "what you wants to do" so that it is understandable for people that only know "simple" english like me

    My primary language is object pascal, after it it is C, Asm, Clipper, then Flemish, Duch, English, German, ...

    If you wants to fill a listbox with all your pushpin names, then just add the names to the listbox at the moment you create you pushpins. Whas this your question ?

  10. #10
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    My VB6 application loads a map into the mappoint control. The map that it loads, has a lot of pushpins already added to it. I want my VB6 app to place the pushpin names in a listbox, so that when the users clicks a pushpin name the map goes to that location.

    I have 3 different sets of pushpins, about 80 pushpins in each set. I'm trying to get each set in their own listbox.

    I'm really new, so thank you for you patience.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Street Names etc...
    By Milo in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-27-2005, 03:16 PM
  2. Show All Names in Set
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-11-2003, 10:28 AM
  3. street names
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 06-04-2003, 07:49 AM
  4. Is there a way of getting rid of all the names of ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-24-2001, 03:10 AM
  5. Also, can I delete the state names and city names ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-29-2000, 01:57 PM

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