Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem populating multicolumn listbox

Status
Not open for further replies.

kbdci

Programmer
Jul 16, 2002
33
US
I am trying to populate a 3 column list box from code. It works fine except when a string contains an ampersand or a comma (and possibly other characters that I haven't tried). When one of those characters is in the text column, that character and everything following it are placed in the first column in error.
Example:
3;4;This text
The above works fine.
5;13;This text & that text
This produces one row with the following:
Row 1 Column 1 = 5
Row 1 Column 2 = 13
Row 1 Column 3 = This text
Row 2 Column 1 = & that text

Is there any way to produce the correct results, that is
Row 1 Column 3 = This text & that text

Thanks.
 
Hiya,

Just a guess based on displaying an ampersand in a label (where you HAVE to use && to see &).....

Use && instead of &.

Hope it works - can't be bothered checking myself.

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top