View Full Version : VBA List Box


shamas21
02-13-2009, 02:22 AM
Hi All

I have two listboxes List1 & List2. I have populated List1 with data. I then have a button that transfers what is selected from List1 into List2.


Me.List2.AddItem Me.List1.ItemData(Me.List1.ItemsSelected(k))


It works fine with the expection if the item selected in List1 has a comma in the data then it adds two rows in List2.

i.e. Pricing Review,Inc

This then transfer into List2 in two rows as
Pricing Review
Inc

But I want it to transfer as one row i.e Pricing Review,Inc

Any help appreciated

DCrake
02-13-2009, 02:26 AM
Take a look at this sample database. Is this what you want

Sample Database (http://www.access-programmers.co.uk/forums/showthread.php?t=165549)

David