ListBox AddItem Error

P

Pete

I am having a problem with the ListBox AddItem function
not working properly. See below:

strItem ="Clin Path;Haem, Bio & retics;HB&ret"
Me!lstProcedure.AddItem Item:=strItem

The problem appears to be due to the comma in the string.
AddItem is supposed to use the semi-colon as the
delimiter character, but the comma is also acting as a
delimeter. How can I add text that contains commas?
Thanks

Peter
 
L

Larry Linson

Simplest solution: remove the commas. In the example you
give, that would not appear to affect the readability.
ListBox lists shouldn't have to have picture-perfect
punctuation. Alternative: replace the commas with "/"
or "|" or "-".

Unfortunately, I am not in a position to try some other
alternatives just now.

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top