Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Adding Items to ComboBox with an "&"
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Adding Items to ComboBox with an "&"

 Post Reply Post Reply
Author
Message
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post Topic: Adding Items to ComboBox with an "&"
    Posted: 17 December 2004 at 1:51pm

Couldn't find this in a search of the forum.

How do you add items to a CommandBar ComboBox that contain an "&" in the expression (like Johnson & Johnson)?  I've tried a few variations of the following, without success:

sListItem = Replace(sListItem, "&", "' & '")

Thanks!

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2004 at 1:57pm
I have no problem adding them.  You can hard code it and say "Johnson & Johnson" or place that string in a variable then assign it.
Back to Top
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2004 at 2:10pm

What's happening to me is the ComboBox is showing "Johnson _Johnson". 

I am retrieving the string from a database field, assigning it to a string variable, then adding it to the combo using the AddItem method.  Any kind of an "&" gets converted to an underscore.  Same thing when I (for testing purposes) hard code the string variable.

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2004 at 2:19pm
OK, I see, it is displayed OK when dropped down, but when selected it displays the underscore.  If you use "&&" if fixes the one problem but displays "&&" in the drop down.  I think I remember this being a bug in the report control and it was fixed, so submit this as a bug so the development team can fix it


Edited by SuperMario
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2004 at 4:39am

We fixed it. Thank you.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.