Geez, I don't know what happened there; must be fat fingers! I wrote it off
the top of my head, and testing would have highlighted the errors. But
you'll notice how I've modified the code even further in the code segment
below.
Do While Not rs.EOF
sValue = sValue & rs!TrackName & ";"
rs.MoveNext
Loop
Me!TracksFound.RowSource = Left(sValue, Len(sValue) - 1)
This essentially does the same thing as you would in VB, using
TracksFound.AddItem, but since Access ListBoxes don't have an AddItem
method, you have to add data to its RowSource property. The last line above,
is what actually assigns the value to the ListBox, but it also removes the
trailing semi-colon, which if left in place, would add a blank line at the
end of the list.
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html