Community of VE/MapPoint Users and Developers
This is a discussion on Extracting PostalCode from Search-Results within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, my problem is, that I need the PostalCode to be shown at the SearchWindow. But I couldn't find any ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Extracting PostalCode from Search-Results my problem is, that I need the PostalCode to be shown at the SearchWindow. But I couldn't find any posibility to show the PostalCode at the results of the search. So I started to create my own searchwindow by using the FindResults-Method. But anyway I get a error returned. This is my code: The line where the error is being returned is marked. I'm using VB6.0. Code:
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim strAddress As String
Dim objFR As MapPoint.FindResults
Dim objSA As MapPoint.StreetAddress
Dim objLOC As MapPoint.Location
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True
strAddress = "Paris, France"
Set objFR = objMap.FindResults(strAddress)
Set objLOC = objFR.Item(1)
Set objSA = objLOC.StreetAddress
'############################################
'here appears the error '91': object variable not set
MsgBox objSA.PostalCode
Thank you |
| |||
|
Hi, The collection can have many results. You have to go to all the results eventually with foreach statement. Secondly, you first have to check if the object / property is assigned. I think this is "Nothing" in VB.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| extracting, postalcode, searchresults |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to handle FindNearby results in C++ | andywolpert | MapPoint 2006/2009 Discussion | 1 | 09-06-2005 06:50 PM |
| Property MatchingMethod results (VBA) | Anonymous | MapPoint 2006/2009 Discussion | 0 | 11-05-2004 11:47 AM |
| FindAddress Results in c# | starbuck | MapPoint 2006/2009 Discussion | 1 | 09-21-2004 06:00 PM |
| help - new user, no results | Anonymous | Products: Pushpin Tool, Single State Mapper | 1 | 07-29-2003 11:56 PM |
| Search results in spanish? | Anonymous | MapPoint 2006/2009 Discussion | 0 | 03-11-2003 02:08 PM |