| 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. |