|
|
Checkbox control properties
Posted: 16 Oct 07 3:49 PM
|
I have a form that has multiple checkbox controls that derive their captions from a databse field. I never realized how many companies have "&" in their name. How can I get a checkbox control to display the "&" instead of "_"? |
|
|
|
Re: Checkbox control properties
Posted: 16 Oct 07 4:07 PM
|
I am not sure, I haven't tried it, but you could probably do it through code and replace it with it's ASCII code of 38 |
|
|
|
Re: Checkbox control properties
Posted: 16 Oct 07 4:28 PM
|
Originally posted by David Nunnally
I have a form that has multiple checkbox controls that derive their captions from a databse field. I never realized how many companies have "&" in their name. How can I get a checkbox control to display the "&" instead of "_"? |
|
You have to escape it with another ampersand. For example:
name = "Farley & Associates" Checkbox.Caption = Replace(name, "&", "&&") '<-- Now checkbox's caption is "Farley & Associates"
Make sense?
-Ryan |
|
|
| |
| |
| |
|
Re: Checkbox control properties
Posted: 17 Oct 07 4:10 PM
|
Originally posted by Mike Spragg
Hey, but what if my name is "Smith && Weston" - won't that loop uncontrollably |
|
Actually, it doesn't loop, it would find 2 ampersands and would replace each to be two consecutive ampersands. You'd end up with "Smith &&&& Weston", which would actually come out looking like "Smith && Weston" in a caption of a label or checkbox.
Besides, what kind of name would really have && in it anyway??! |
|
|
|
Re: Checkbox control properties
Posted: 17 Oct 07 5:45 PM
|
Originally posted by Ryan Farley
Actually, it doesn't loop, it would find 2 ampersands and would replace each to be two consecutive ampersands. You'd end up with "Smith &&&& Weston", which would actually come out looking like "Smith && Weston" in a caption of a label or checkbox.
Besides, what kind of name would really have && in it anyway??! |
|
A company with a stutter p-p-perhaps ) |
|
|
| |
|