View Full Version : MapPoint and vb 6

01-17-2006, 05:18 PM
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?

01-18-2006, 05:39 AM

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.