MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Extracting PostalCode from Search-Results

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


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-17-2006
Junior Member
White Belt
 
Join Date: Jul 2006
Posts: 2
Extracting PostalCode from Search-Results

Hi,
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
Can anybody please help me? I don't know what to do.
Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 07-19-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
extracting, postalcode, searchresults


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 09:26 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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