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

MapPoint and vb 6

This is a discussion on MapPoint and vb 6 within the MapPoint Desktop Discussion forums, part of the Map Forums category; I have a vb 6 app that references MapPoint and uses the following code. Set oFindResults = oMap.FindAddressResults(NonEmptyField(rs!Addr1, ""), NonEmptyField(rs!City, ...

  1. #1
    bgower is offline Junior Member White Belt
    Join Date
    Sep 2005
    Posts
    3

    MapPoint and vb 6

    I have a vb 6 app that references MapPoint and uses the following code.

    Set oFindResults = oMap.FindAddressResults(NonEmptyField(rs!Addr1, ""), NonEmptyField(rs!City, ""), NonEmptyField(Left(rs!State, 2), ""))
    If oFindResults.ResultsQuality = geoFirstResultGood Then
    Set oPushPin = oMap.AddPushpin(oFindResults.Item(1), rs!CardNo)
    oPushPin.BalloonState = geoDisplayName
    lCountMappedMembers = lCountMappedMembers + 1

    It works fine as long as the street address and the city and the state are correct. If it can't match exactly the street+city+state then a get an object required error on the FindAddressResult line. How can I work around this?

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

    If there is no matching address then the Resultsquality is GeoNoGoodResult or GeoNoResult. I never saw FindAddressResults generating an exception wen it cannot find a match.

    But what does NonEmptyField() do ? I have some suspician it had something to do with that. Please explain this function.

Thread Information

Users Browsing this Thread

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

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