View Full Version : Matching unmatched items after import into VB6 app
12-19-2002, 07:47 AM
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.
12-19-2002, 09:01 AM
I try to give you a way:
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
'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.
12-20-2002, 06:27 AM
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))
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.
01-20-2004, 08:39 AM
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
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO