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 6 of 6

the requested member of the collection does not exist."

This is a discussion on the requested member of the collection does not exist." within the MapPoint Desktop Discussion forums, part of the Map Forums category; frmMap.mpc.NewMap ("C:\Program Files\Microsoft MapPoint Europe\Templates\belgium.ptt") Load frmMap frmMap.Show Dim objPin As Pushpin Dim objLoc As Location Dim place As String ...

  1. #1
    yvdp is offline Junior Member Yellow Belt
    Join Date
    Apr 2004
    Posts
    12

    the requested member of the collection does not exist."

    frmMap.mpc.NewMap ("C:\Program Files\Microsoft MapPoint Europe\Templates\belgium.ptt")
    Load frmMap
    frmMap.Show

    Dim objPin As Pushpin
    Dim objLoc As Location
    Dim place As String

    Dim objApp As New MapPoint.Application

    For cntr = 1 To objRec.RecordCount
    place = objRec!firmaid & ", " & objRec!naam & ", " & objRec!straatnaam & ", " & objRec!straatnummer & ", " & objRec!gemeente & ", " & objRec!postcode
    Set objLoc = frmMap.mpc.ActiveMap.FindResults(place).Item(1)
    If objLoc Is Nothing Then
    MsgBox "Nothing Found"
    Exit Sub
    End If
    frmMap.mpc.ActiveMap.AddPushpin objLoc, objRec!naam
    objRec.MoveNext
    Next cntr
    This is the code i'm using. The following error is what I get:

    the requested member of the collection does not exist. Use a valid name or index number
    When I click the debug-button is reffers to "Set objLoc = frmMap.mpc.ActiveMap.FindResults(place).Item(1)"

    I'm stuck with this problem for already about 2 days and I can't figure it out myself

    Somebody who can help me?
    thanks in advance.
    greetz

  2. #2
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    Try checking the return value from FindResults - is it actually finding the address?

    You also probably want to look at the value of place: ie. is your formatting correct?


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    I can check them, but I think it's just a problem with the database. No?

  4. #4
    yvdp is offline Junior Member Yellow Belt
    Join Date
    Apr 2004
    Posts
    12
    Quote Originally Posted by Anonymous
    I can check them, but I think it's just a problem with the database. No?
    that was me
    greetz

  5. #5
    yvdp is offline Junior Member Yellow Belt
    Join Date
    Apr 2004
    Posts
    12
    is there any possible way to skip the records with that error?
    if so, can somebody please help me?

    thx in advance.
    greetz

  6. #6
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    Hi,

    Dim a FindResults Collection and stick all of the results into that.

    Then check the Count property, if it is 0 then I think your line returns an error... basically put an "If Count <> 0 Then your line..:

    "Set objLoc = myFindResultsCollection.Item(1)"

    hth,
    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. garbage collection
    By SimonPearse in forum MapPoint Desktop Discussion
    Replies: 6
    Last Post: 01-05-2007, 01:10 PM
  2. Garbage collection
    By daxydoggie in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 05-04-2005, 01:35 PM
  3. requested member of collection does not exist
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 11-16-2004, 08:22 AM
  4. How know if a pushpin exist ?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 07-01-2004, 04:05 AM
  5. Do I need "Autoroute Europe", if I install "M
    By bigtail in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-24-2004, 12:58 AM

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 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 60 61 62 63 64 65 66