Add items to a listbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a listbox to which I would like to add names to. The problem I'm
having is: the names are seperated by commas, such as; Doe, John. So when I
put them in a list box, the addItem option splits the Doe and the John and
puts them on different lines when they should be on one. I assume this has
to do with the comma seperating the two. Is there a way to add the item as
it comes from my query: "Doe, John"?
 
Afraid I can't test (as I only have Access 97 on this machine, and it
doesn't support the AddItem method for list boxes), but try putting quotes
around the value:

Me.MyListBox.AddItem Chr$(34) & rsData.Fields("FullName") & Chr$(34)
 
Back
Top