如何在ListBox.AddItem字符串中添加逗号?一定很容易! [英] How can I put a comma in a ListBox.AddItem string? Must be easy!

查看:77
本文介绍了如何在ListBox.AddItem字符串中添加逗号?一定很容易!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在代码中填充列表框。执行此操作的代码是......

I''m trying to populate a listbox in code. The code that does this is ...

展开 | 选择 | Wrap | 行号

推荐答案

WHOOPS!保持一切,专家!

突然间它也不能用分号。发生了奇怪的事......抱歉。不要浪费你的优势大脑,直到我找到关于问题的更多(准确)信息回复你。
WHOOPS! HOLD EVERYTHING, EXPERTS!
Suddenly it doesn''t work with the semi-colon either. Something weird is happening ... Sorry. Don''t waste your superior brains on this until I get back to you with more (accurate) information about the problem.


好的,让我们再来一次...... br />

使用逗号,它永远不会有效。使用分号似乎可以决定是否工作(这是非常令人担忧的)。结肠,没关系。

我已将strToAdd更改为以下内容...


strToAdd = rstSkeleton!SkeletonString& : &安培; Me.EventTitle& " (& dateStr&")"


......这会产生,例如


"门票:花园党(10/5/09)


这是可以接受的(是的,我解决了/问题!)


但是我仍然好奇关于如何将逗号写入这样的字符串???
OK, let''s have another go ...

With a comma, it never works. With a semi-colon it seems to decide on the fly whether to work or not (which is very worrying). With a colon, it''s fine.
I have changed strToAdd to the following ...

strToAdd = rstSkeleton!SkeletonString & ": " & Me.EventTitle & " (" & dateStr & ")"

... and this produces, e.g

"Tickets: Garden Party (10/5/09)"

which is acceptable (and, yes, I solved the "/" problem!)

But I''m still curious about how to get a comma into such a string???


这对我有用:
This worked for me:
展开 | 选择 | 换行 | 行号


这篇关于如何在ListBox.AddItem字符串中添加逗号?一定很容易!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆