View Full Version : Latitude/Longitude Address on Map

11-25-2005, 01:04 PM
Hi Hope someone could help,

I have an access data base that has all my customer addresses on a Table and would like to add a latitude and Longitude to the table to pin point the customer location as I understand this is the best way to make sure customers donít overlap each other, also it there a way or code to place on the event procedure on click of a button in Microsoft Access to export customer address and pin them on Map Point? I would like to be able to export more then on load number, for example each customer has a Load # (150) and Stop # (111) the load number represents a Truck and what I would like to do is in some way to export more then one load at time and map it on one click. If you could help it would be greatly appreciated.


11-26-2005, 11:58 AM

I'm not sure I understeand your question completely, but I understeand that you wants to program in VBA to display your customar locations on the map. I type example in C# because if I should do it in VB then I will type too many syntax errors :(

There is a method:

FindResults results = mp.ActiveMap.FindAddressResults(street, city, othercity, region, zip, country);
Which returns a collection of Location objects. This Location object can be used to put a push pin on the map, like this:

if &#40;results.ResultsQuality <= GeoFindResultsQuality.geoAmbiguousResults&#41;
foreach &#40;object o in results&#41; &#123;
Location Loc = o as Location;
if &#40;Loc != null&#41; &#123;
Pushpin PP = mp.ActiveMap.AddPushpin&#40;Loc, ""&#41;;