PC Review


Reply
Thread Tools Rate Thread

displaying a checkbox on a report

 
 
=?Utf-8?B?a2ltYw==?=
Guest
Posts: n/a
 
      22nd Jun 2004
I have a parameter query tied to a form, that then prints out its results in a report. There are many checkboxes on the form. I would like the report to display the checkbox if the checkbox is selected in the form, if not, I don't want the checkbox to display. I'm thinking this can be accomplished with a simple vb code, but I don't know vb very well.

Any help is appreciated.


 
Reply With Quote
 
 
 
 
Rob
Guest
Posts: n/a
 
      22nd Jun 2004
There is a way to do this without code, by using IIF() and
getting creative with your font selection.

Place an unbound text box on the report, and then set its
Control Source to:

=IIF([Forms]![formname]![checkboxname],"R")

Then change the font for this text box to WingDings2. The
result will be nothing if the checkbox on the form is not
set, and a square with a checkmark in it if the checkbox
is set.

To use a different graphic, you can change the R to a
different letter and/or select a different symbol font.

Rob



>-----Original Message-----
>I have a parameter query tied to a form, that then prints

out its results in a report. There are many checkboxes on
the form. I would like the report to display the checkbox
if the checkbox is selected in the form, if not, I don't
want the checkbox to display. I'm thinking this can be
accomplished with a simple vb code, but I don't know vb
very well.
>
>Any help is appreciated.
>
>
>.
>

 
Reply With Quote
 
=?Utf-8?B?a2ltYw==?=
Guest
Posts: n/a
 
      22nd Jun 2004
Where did you come up with that little gem! I love it! It looks like a disaster to the person who accidentally goes into design mode of the report, but nobody will but me!

"Rob" wrote:

> There is a way to do this without code, by using IIF() and
> getting creative with your font selection.
>
> Place an unbound text box on the report, and then set its
> Control Source to:
>
> =IIF([Forms]![formname]![checkboxname],"R")
>
> Then change the font for this text box to WingDings2. The
> result will be nothing if the checkbox on the form is not
> set, and a square with a checkmark in it if the checkbox
> is set.
>
> To use a different graphic, you can change the R to a
> different letter and/or select a different symbol font.
>
> Rob
>
>
>
> >-----Original Message-----
> >I have a parameter query tied to a form, that then prints

> out its results in a report. There are many checkboxes on
> the form. I would like the report to display the checkbox
> if the checkbox is selected in the form, if not, I don't
> want the checkbox to display. I'm thinking this can be
> accomplished with a simple vb code, but I don't know vb
> very well.
> >
> >Any help is appreciated.
> >
> >
> >.
> >

>

 
Reply With Quote
 
=?Utf-8?B?a2ltYw==?=
Guest
Posts: n/a
 
      22nd Jun 2004
One more question - what can be done about the labels for these checkboxes? I wouldn't want them to display either unless the checkbox was selected.

Thanks!

"Rob" wrote:

> There is a way to do this without code, by using IIF() and
> getting creative with your font selection.
>
> Place an unbound text box on the report, and then set its
> Control Source to:
>
> =IIF([Forms]![formname]![checkboxname],"R")
>
> Then change the font for this text box to WingDings2. The
> result will be nothing if the checkbox on the form is not
> set, and a square with a checkmark in it if the checkbox
> is set.
>
> To use a different graphic, you can change the R to a
> different letter and/or select a different symbol font.
>
> Rob
>
>
>
> >-----Original Message-----
> >I have a parameter query tied to a form, that then prints

> out its results in a report. There are many checkboxes on
> the form. I would like the report to display the checkbox
> if the checkbox is selected in the form, if not, I don't
> want the checkbox to display. I'm thinking this can be
> accomplished with a simple vb code, but I don't know vb
> very well.
> >
> >Any help is appreciated.
> >
> >
> >.
> >

>

 
Reply With Quote
 
Rob
Guest
Posts: n/a
 
      22nd Jun 2004
Well, the easiest way to deal with the lables is to simply
get rid of them and make another copy your textbox that
generates the symbol. Replace the R with the proper text
and use a "real" font.

As for where it came from, I honestly don't remember.
I've been using variations of this for many years, on both
forms and reports. It likely came from something somebody
posted on this newsgroup long long ago, but unfortunately
I don't know who to give the proper credit.

Rob.


>-----Original Message-----
>One more question - what can be done about the labels for

these checkboxes? I wouldn't want them to display either
unless the checkbox was selected.
>
>Thanks!
>
>"Rob" wrote:
>
>> There is a way to do this without code, by using IIF()

and
>> getting creative with your font selection.
>>
>> Place an unbound text box on the report, and then set

its
>> Control Source to:
>>
>> =IIF([Forms]![formname]![checkboxname],"R")
>>
>> Then change the font for this text box to WingDings2.

The
>> result will be nothing if the checkbox on the form is

not
>> set, and a square with a checkmark in it if the

checkbox
>> is set.
>>
>> To use a different graphic, you can change the R to a
>> different letter and/or select a different symbol font.
>>
>> Rob
>>
>>
>>
>> >-----Original Message-----
>> >I have a parameter query tied to a form, that then

prints
>> out its results in a report. There are many checkboxes

on
>> the form. I would like the report to display the

checkbox
>> if the checkbox is selected in the form, if not, I

don't
>> want the checkbox to display. I'm thinking this can be
>> accomplished with a simple vb code, but I don't know vb
>> very well.
>> >
>> >Any help is appreciated.
>> >
>> >
>> >.
>> >

>>

>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkbox not displaying in DetailsView Peter Microsoft ASP .NET 1 27th Jun 2009 05:37 PM
Displaying values in a label on a Report using a checkbox rupelo Microsoft Access 2 27th Nov 2006 02:16 PM
Displaying a checkbox on a report =?Utf-8?B?RFY=?= Microsoft Access 1 10th Feb 2006 05:27 PM
Displaying Checkbox results cabellm Microsoft VB .NET 2 19th Sep 2005 05:45 AM
text for checkbox not displaying SirPoonga Microsoft ASP .NET 0 19th Jan 2005 04:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:20 AM.