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

Matching unmatched items after import into VB6 app

This is a discussion on Matching unmatched items after import into VB6 app within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am importing a salesman's route (in a CSV file) into my VB6 app using the Mappoint ActiveX control. The ...

  1. #1
    abaker is offline Junior Member White Belt
    Join Date
    Dec 2002
    Posts
    2

    Matching unmatched items after import into VB6 app

    I am importing a salesman's route (in a CSV file) into my VB6 app using the Mappoint ActiveX control. The CSV file contains street, town, county and postcode, and I am using the ImportData method to create a dataset and associated pushpins on my map, first of all using the postcode. However, some postcodes in the data may be missing or incorrect, and the ImportData method does not find the correct location or add a pushpin to the map. Using a Mappoint recordset, I can find which items were unmatched, and then find them using the other criteria (street, town etc), with the FindAddressResults method. If the correct location can be found in this way, I would like to add the result to the dataset, but cannot find a way of doing this. Any help would be appreciated.
    Thanks in advance.
    Andy Baker

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Hi,
    I try to give you a way:

    mymap.NewMap (geoMapEurope)
    Set oMap = mymap.ActiveMap

    'You add a group to the collection Datasets
    oMap.DataSets.AddPushpinSet "g1" 'this is a group

    'You find your adress
    Set locTest = oMap.FindAddressResults("", txt, "", "", vcode, vcountry).Item(1)

    'You place your pushpin in your map
    Set opPin = oMap.AddPushpin(locTest, title)
    'You had your pushpin to the group
    opPin.MoveTo oMap.DataSets.Item("g1")
    'The pushpin will have a symbol ...
    opPin.BalloonState = geoDisplayName
    opPin.Symbol = n

    I think that the grpou "g1" coul be those you have import from your data file.

    Bye,

    Val

  3. #3
    abaker is offline Junior Member White Belt
    Join Date
    Dec 2002
    Posts
    2
    Thanks for the tip. Setting the pushpin symbol and adding it manually to the map is much better than not displaying it at all. The problem that I now have is that the pushpin remains unmatched. I am displaying the details of each location using
    xShowFields = Array(oDataset.Fields(2), oDataset.Fields(3), oDataset.Fields(4), oDataset.Fields(5))
    oDataset.SetFieldsVisibleInBalloon (xShowFields)

    to display the customer fields in the information balloon. However, the unmatched pushpin has no such fields, and I can only display the pushpin name, which is the unique customer code. This is not very meaningful, unless the user knows all the codes, and I would prefer to be able to display the customer name and address as I do for all the imported pushpins.

  4. #4
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    I am trying to link Access and Mappoint so that I can check to see which records contain invalid postcodes.
    Is this possible using VBA as I do not have access to VB6 or other SDKs?

    I don't need any automation, I just want it to return a list of al records (account code & post code), so that I can then go to those accounts and correct/update the post codes

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sum of Items within a Radius?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-09-2005, 05:47 PM
  2. Unmatched records
    By fletch in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 03-09-2005, 10:24 AM
  3. Programmatically selecting Unmatched results?
    By mschoonmaker in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 01-21-2005, 08:13 AM
  4. export unmatched records
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-17-2003, 02:51 PM
  5. Non Mapped Items
    By Anonymous in forum Wish List
    Replies: 0
    Last Post: 12-17-2002, 03:33 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