how do I hide check box in a report if it is false

G

Guest

I have a db that has a table with several checkboxes. Each employee may have
all or any number of checkboxes selected. I'm trying to create a report
based on this table but I don't want the checkbox to appear if it is false.

If have tried to create a query but no luck so far, any suggestions?
 
M

Marshall Barton

Carol said:
I have a db that has a table with several checkboxes. Each employee may have
all or any number of checkboxes selected. I'm trying to create a report
based on this table but I don't want the checkbox to appear if it is false.

If have tried to create a query but no luck so far, any suggestions?


Filtering the report's record source query can remove
records but it can not hide values. You can use code in the
Format event of the report section that contains the check
boxes:
Me.checkbox1.Visible = Me.checkbox1
Me.checkbox2.Visible = Me.checkbox2
Me.checkbox3.Visible = Me.checkbox3
. . .

I don't like the way a check box looks on a report so I use
a small text box instead. Since a YesNo field in a table is
either -1 (True) or 0 (False), you can just use a custom
format to put an X in the box:
;\X;"";

This approach has the added advantage that you can set the
text box's CanShrink property so the space it occupied is
not used when you make the text box invisible,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top