Is there a way of adding a semicolon to a listbox? Is there specific string (similar to vbcr) that would add a semicolon?
Printable View
Is there a way of adding a semicolon to a listbox? Is there specific string (similar to vbcr) that would add a semicolon?
?? u mean just adding a semi after the text?
List1.Additem strItem & ";"
http://www.vbforums.com/
or
VB Code:
List1.Additem strItem & Chr("59")
isnt it this? Chr(59)
Edit: ok just tested.. both work Chr("59") & Chr(59).... :blush:
Chr(59)... that's it. Thanks to everyone for their help.
yes, either are fineQuote:
Originally Posted by Static
if this thread has been resolved, please resolve thread for other members.Quote:
Originally Posted by rohcky
I thought that using this technique would work, but it did not. Is there a difference between standard VB and the VB used by Access when creating forms? I tried to add the semicolon and it did not work. It still cuts off any text found after the semicolon.
Code similar to this:
[listAddr].AddItem (<str> & <str> & Chr(59) & <str> & vbCrLf)
Even when I try something simple like:
[listAddr].AddItem (<str>) & Chr(59)
it only stores the <str>.
check the properties of the Listbox...
make sure u have it set to the correct number of columns.. and that the col widths are right
Yes VB used by Access or Excel is called as VBA. try asking your question in the Office Development Section of VBF.Quote:
Originally Posted by rohcky
Thanks, I'll try and see if I they have an answer over there.
And thanks static, I changed the number columns to get around an error that I was having, but it still wouldn't let me add the semicolon to the string. Still considered it a delimiter.
well.. actually thats because in access it IS a delim.. for columns..
Is it possible to do that? I know that Listboxes use semis as a delimiter. But the project that I am working on requires that I use a semicolon in the strings. So I need to store them.
Is there a special way, like using ascii-like code, to store a semicolon-filled string in a ListBox?
It would be better for the Office Development people to see what has already been suggested rather than start from scratch.
Access VBA question moved to Office Development.
u could store them a semicolon, but u wont be able to display them
try displaying as a colon? : ? there is no way around this that I know of
Unfortunately I have to store and display the semi, otherwise there's no point in storing it. I have a work around to solve my problem, but was wondering if it's possible to do this for future reference.Quote:
Originally Posted by Static
no.. u cant display ; in the standard access listbox or combobox.. it will always convert it to a delimiter for the combos columns...
I couldnt find anything out on the net about changing it either. sorry
Hi All,
I don't like the sound of that last reply Static :)
I have the exact same problem and not much of a workaround.
I need to display Khmer text in the combo box (yes I know...). I use Limon fonts which display Latin caracters using Khmer letters and unfortunatly, Khmer uses a lot of one caracter corresponding to the ";" Latin caracter and my application is widely based on Combo boxes.
I tried a variety of combination and ended up with this:
TEST_LIST4.addItem "1,""PasarGg,eKøs"""
I use "," as column separator and put the column value inside double quotes.
I haven't implemented this yet because I read everywhere that semicolon should be used as column separator so I am not sure this would work. But on the test, the display of the combo is OK.
What do you think ? Is this complete utopia or could this work ? Any issue you could think of when using comma as column separator ?
Cheers,
Jerome