LIstbox delimiters

kirkm

Registered User.
Local time
Tomorrow, 08:53
Joined
Oct 30, 2008
Messages
1,257
Was there ever a solution found for including commas and semicolons in a (single column) listbox without them bring taken as a field delimiter?
I read that replacing a semicolin with a comma worked - but it didn't for me. Both cutoff the text.
 
Hi. Not in front of a computer now, but have you tried using a Table/Query instead of Value List?
 
No, but I will if that's the only way.
 
It's the only one I could think of right now.

Have you tried enclosing the list items in quotes?
 
No, I read it didn't work. Are you suggesting it will ?
The table method does though, just seeing now if leading spaces appear or not.
 
Like this?
lbox.jpg


Code:
Me.List0.AddItem """aaa;bbb"""
Me.List0.AddItem """LLL,OOO"""
 
Are the multiple quotes using .AddItem better that using a table? Or doesn't really matter ?
 
Are the multiple quotes using .AddItem better that using a table? Or doesn't really matter ?
It may depend on how many items you plan on having in your list. I am not sure if there is a limit for adding items using the AddItem method. If there is and you need more, then I guess you'll have to use a query instead. Otherwise, the only other thing I could think of is it is probably faster to use a query/table over AddItem if you have to add so much items.
 
Thank you Pat. I did go with the tables as it also would then allow leading spaces.
 
Hah I thought I was being insulted! So I was keen to see what was so bad... as for a space or punctuation in a list box, sure it may be unusual but it's what I have got. Actually the spaces are indents for rows that are not "significant" (for lack of a better word).
Most probably the list box isn't the right control, but I have to use what I know. Not that know very much! But I do know what the end result needs to be and do.
 

Users who are viewing this thread

Back
Top Bottom