|
-
Apr 24th, 2006, 02:38 PM
#1
Thread Starter
New Member
Add String with semicolon to a ListBox
Is there a way of adding a semicolon to a listbox? Is there specific string (similar to vbcr) that would add a semicolon?
Last edited by Hack; Apr 25th, 2006 at 09:29 AM.
-
Apr 24th, 2006, 02:42 PM
#2
Re: Add String with semicolon to a ListBox
?? u mean just adding a semi after the text?
List1.Additem strItem & ";"
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Apr 24th, 2006, 03:00 PM
#3
PowerPoster
Re: Add String with semicolon to a ListBox
or
VB Code:
List1.Additem strItem & Chr("59")
-
Apr 24th, 2006, 03:13 PM
#4
Re: Add String with semicolon to a ListBox
isnt it this? Chr(59)
Edit: ok just tested.. both work Chr("59") & Chr(59)....
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Apr 25th, 2006, 07:12 AM
#5
Thread Starter
New Member
Re: Add String with semicolon to a ListBox
Chr(59)... that's it. Thanks to everyone for their help.
Last edited by rohcky; Apr 25th, 2006 at 07:37 AM.
-
Apr 25th, 2006, 07:23 AM
#6
PowerPoster
Re: Add String with semicolon to a ListBox
 Originally Posted by Static
isnt it this? Chr(59)
Edit: ok just tested.. both work Chr("59") & Chr(59).... 
yes, either are fine
-
Apr 25th, 2006, 07:24 AM
#7
PowerPoster
Re: Add String with semicolon to a ListBox
 Originally Posted by rohcky
Chr(59)... that's it. Thanks to everyone for their help.
@Static: Can't use ";" because semicolons are delimiters. It sees the semi and cuts off the rest of the text.
if this thread has been resolved, please resolve thread for other members.
-
Apr 25th, 2006, 08:02 AM
#8
Thread Starter
New Member
Re: [RESOLVED] Add String with semicolon to a ListBox
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>.
-
Apr 25th, 2006, 08:27 AM
#9
Re: [RESOLVED] Add String with semicolon to a ListBox
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
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Apr 25th, 2006, 08:51 AM
#10
Re: [RESOLVED] Add String with semicolon to a ListBox
 Originally Posted by rohcky
Is there a difference between standard VB and the VB used by Access when creating forms?
Yes VB used by Access or Excel is called as VBA. try asking your question in the Office Development Section of VBF.
-
Apr 25th, 2006, 09:16 AM
#11
Thread Starter
New Member
Re: [RESOLVED] Add String with semicolon to a ListBox
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.
-
Apr 25th, 2006, 09:18 AM
#12
Re: [RESOLVED] Add String with semicolon to a ListBox
well.. actually thats because in access it IS a delim.. for columns..
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Apr 25th, 2006, 09:19 AM
#13
Thread Starter
New Member
Store a string with a semi-colon in a ListBox
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?
-
Apr 25th, 2006, 09:30 AM
#14
Re: Add String with semicolon to 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.
-
Apr 25th, 2006, 09:47 AM
#15
Re: Add String with semicolon to a ListBox
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
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Apr 25th, 2006, 10:36 AM
#16
Thread Starter
New Member
Re: Add String with semicolon to a ListBox
 Originally Posted by Static
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.
-
Apr 26th, 2006, 11:01 AM
#17
Re: Add String with semicolon to a ListBox
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
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Aug 14th, 2006, 03:34 AM
#18
New Member
Re: Add String with semicolon to a ListBox
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|