AccessBlog.net

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Alex
Name:Alex Dybenko

Location:Moscow, Russia

Tuesday, March 27, 2012

How to put comma or semicolon in Listbox using AddItem

If you try to add list item, containing text with comma or semicolon, to Access listbox using .AddItem method - item will be split into rows, listbox interpret comma as separator:

Me.List0.AddItem "One, two, three"

image

The trick is to put string in quotes:

Me.List0.AddItem "'One, two, three'"

image

Labels:

0 Comments:

Post a Comment

<< Home