Thread: Pushpin Names
View Single Post

  #3 (permalink)  
Old 01-28-2005
Anonymous Anonymous is offline
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Populate list box with pushpin names

Here's what I did in VBA (Access):

Set List = Me![Cardinal]
List.RowSourceType = "Value List"
Set rstListBox = objMap.DataSets.Item("Cardinal Directions").QueryAllRecords
While Not rstListBox.EOF
strList = strList & """" & rstListBox.Pushpin.Name & """" & ";"
MsgBox "strList is " & strList
rstListBox.MoveNext
Wend
intLength = Len(strList)
List.RowSource = strList
List.Requery

The QueryAllRecords gets the info from the pushpin set. I'm using Access 2000, so I couldn't use AddItem to add the pushpin names to the list box, so I concatenated them into a value list instead. Hope this helps.
Reply With Quote