MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Sanity Check Please......Pushpin help

This is a discussion on Sanity Check Please......Pushpin help within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; If a user manually adds two or more pushpins to a map control, there has got to be a way ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-18-2005
EdB EdB is offline
Member
Green Belt
 
Join Date: Aug 2002
Posts: 56
Sanity Check Please......Pushpin help

If a user manually adds two or more pushpins to a map control, there has got to be a way to cycle through them all to get the names of the pushpins, doesn't there?

I tried this example:

Dim objDataSet As MapPoint.DataSet
Dim objRecordset As MapPoint.Recordset
Dim objField As MapPoint.Field
objDataSet = AxMappointControl1.OpenMap("C:\Program Files\Microsoft MapPoint\Samples\Clients.ptm").DataSets("Clients")

'Retrieve all records
objRecordset = objDataSet.QueryAllRecords

'Get the values
Dim vals As String
objRecordset.MoveFirst()
Do Until objRecordset.EOF
For Each objField In objRecordset.Fields
vals = vals & CStr(objField.Value) & vbTab
Next objField
vals = vals & vbCrLf
objRecordset.MoveNext()
Loop
MsgBox(vals)


which works just great for the sample, but when I try the same thing after adding pushpins, my objRecordSet shows the right number of pushpins, but the number or Fields is 0, so this:

For Each objField In objRecordset.Fields

Just falls right through.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 02-18-2005
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
Don't worry about the fields. Consider this example.

Code:
Set objmap = MappointControl1.ActiveMap
Dim objRecordSet As MapPointctl.Recordset
Dim objpushpin As MapPointctl.Pushpin

For Each objDataSet In objmap.DataSets
If objDataSet.Name = "My Pushpins" Then
Set objRecordSet = objDataSet.QueryAllRecords
objRecordSet.MoveFirst

Do Until objRecordSet.EOF
MsgBox objRecordSet.Pushpin.Name
objRecordSet.MoveNext
Loop

End If
Exit For
Next
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 02-22-2005
EdB EdB is offline
Member
Green Belt
 
Join Date: Aug 2002
Posts: 56
Meant to get back to you on this.

Worked perfect....thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
check, pleasepushpin, sanity


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Check out if GPS pos is on a Route kristijan MapPoint 2006/2009 Discussion 11 04-19-2006 11:46 AM
Is there way to check if you're on a road Omair MapPoint 2006/2009 Discussion 1 01-05-2005 07:56 AM
Check error with VBA before adding pushpin Anonymous MapPoint 2006/2009 Discussion 2 03-24-2004 10:36 AM
GPS position check Anonymous MapPoint 2006/2009 Discussion 14 01-19-2004 02:00 AM
Check if a waypoint and a pushpin exist Anonymous MapPoint 2006/2009 Discussion 2 08-19-2003 10:27 AM


All times are GMT -5. The time now is 12:27 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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