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

Problem creating find routine

This is a discussion on Problem creating find routine within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am creating my own version of the find place name function to find my accounts. My code is copied ...

  1. #1
    David Kachuck is offline Junior Member Yellow Belt
    Join Date
    Jul 2002
    Posts
    17

    Problem creating find routine

    I am creating my own version of the find place name function to find my accounts. My code is copied from the sample find program except that my find string (strAccountName) comes from a separate form specially designed for that purpose. Somehow I get a "type mismatch" error on setting the objLoc:

    Dim intX As Integer

    strAccountName = frmSearchMap.strAccountName
    Set objMap = MappointControl1.ActiveMap

    Set objFindResults = objMap.FindPlaceResults(strAccountName)
    frmSearchMap.lstPossibleNames.Clear
    intX = 1
    Do While intX <= objFindResults.Count
    Set objLoc = objFindResults.Item(intX)
    frmSearchMap.lstPossibleNames.AddItem objLoc.Name
    intX = intX + 1
    Loop

    frmSearchMap.lstPossibleNames.Visible = True

    frmSearchMap.Show

    Perhaps someone can see my blind spot here. Any suggestions appreciated.
    David Kachuck
    dk0146@netscape.net

    Oracle Certified Professional Database Administrator (OCP)
    MS Access Certified Expert (MAUS)

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    Try making this change to the Do Loop.

    Do While intX <= objFindResults.Count
    frmSearchMap.lstPossibleNames.AddItem objFindResults.Item(intX) .Name
    intX = intX + 1
    Loop

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Creating an Add-in in VS .net
    By Anonymous in forum MP2K Magazine Articles
    Replies: 2
    Last Post: 02-18-2005, 07:21 PM
  2. TIP: Creating A HyperLink Map to Find Polling Place
    By Eric Frost in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 11-16-2004, 11:31 PM
  3. Routing routine
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 02-27-2004, 01:16 PM
  4. Creating a tooltip on a map
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 01-20-2004, 07:09 AM
  5. POI Extraction Routine
    By EdB in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 08-09-2002, 04:28 AM

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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83