Community of VE/MapPoint Users and Developers
This is a discussion on code problem within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello people, I'm trying to execute the following code but get an exception on the map object (objmap.location) in the ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| code problem I'm trying to execute the following code but get an exception on the map object (objmap.location) in the querycircle function. Any ideas...thanks PublicSub getshape() Dim objMap As MapPoint.Map Dim objDataSet As MapPoint.DataSet Dim objRecords As MapPoint.Recordset Dim location As MapPoint.FindResults Dim objfield As MapPoint.Field Dim lngcount AsInteger AxMappointControl1.NewMap(MapPoint.GeoMapRegion.ge oMapNorthAmerica) objMap = AxMappointControl1.ActiveMap objDataSet = AxMappointControl1.ActiveMap.DataSets.GetDemograph ics(MapPoint.GeoCountry.geoCountryUnitedStates) Dim datafieldkey AsObject = "Population (2002)" Stop location = objMap.FindResults("reston, va") objRecords = objDataSet.QueryCircle(objMap.Location, 1000) objRecords.MoveFirst() DoWhileNot objRecords.EOF lngcount = lngcount + 1 objRecords.MoveNext() Loop MsgBox("Number of records in circle: " & lngcount) EndSu |
| ||||
| Re: code problem
Do you mean "objMap.Location"? Or do you mean use your "location" variable? Note that the find methods return a FindResults object. This reports the results quality an a collection of results. You might need something like "location.item(1)" instead, to choose the first result. Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
![]() |
| ||||
| Posted By | For | Type | Date | |
| Microsoft MapPoint 2006 - MP2K Magazine | This thread | Refback | 04-17-2007 01:59 PM | |
| MapPoint Gets New General Manager - MapPoint News - MP2K Magazine | This thread | Refback | 04-14-2007 09:05 AM | |
| MapPoint For Dummies - MP2K Magazine | This thread | Refback | 04-11-2007 10:03 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Zip Code Problem | Anonymous | MapPoint 2006/2009 Discussion | 1 | 12-07-2003 09:50 PM |
Flights to Poland
An increasing number of cheap flights to Poland make Warsaw a city not to miss. Holiday Hypermarket help to book great value flights and accommodation too.
Flights to Portugal
Find and book flights to Portugal. Travel Counsellors can help with travel to Portugal including flights and accommodation.
Cape Town Flights
Book Cape Town flights through dealchecker.co.uk to get a great deal. Cape Town has fantastic weather and a wide range of activities to keep you busy.
Cancun Holidays
Cancun holidays offer beautiful scenery, calm waters and plenty of shopping. Get a taste of the good life while on holiday in Cancun.
Portugal
As well as providing some great weather Portugal has much to offer culturally. There are numerous museums, monuments and places of historical interest to explore. Despite the rich history there is a buzzing nightlife and great shopping too.
Price Comparisons
Search and compare millions of holidays, flights and hotels etc. At Travel.co.uk, price comparisons are easy.
Sharm el Sheikh Holidays
Visit Egypt! Get info on Sharm El Sheikh holidays, only at On The Beach.