Displaying header of yes/no boxes instead of boxes

J

Jerry C

Each record has 5 checkboxes for the 5 diff fields

At the moment I only have the report display the actual checkboxes for
each record..checked or unchecked combinations

Is there a way to make it so instead of a checkbox, it displays the
text of the field that the checkbox corresponds to, for each record on
the report?
 
A

Allen Browne

Open the report in design view.
Replace each check box with a text box.
Set the Control Source of the text box to an expression like this:
=IIf([YN], "Show this", Null)
where YN represents the name of the Yes/No field, and "Show this" represents
the text you want to see.

It may not be a good design to use multiple yes/no fields like that in a
table. See if this applies to you:
Don't use Yes/No fields to store preferences
at:
http://allenbrowne.com/casu-23.html
 
J

John Spencer

Do you want different values to display based on whether the field in the
record is true or false? Or do you want to display a specific value (the
field name) if the field is true and blank if the field is false?

One way you can do this in a report is to add a text box control to the report
and set its source to the field. Then use the format function of the control
to display something based on the value.

Format: "";"This Is False";"This Is True";""

Another is to use an expression as the source for the textbox
= IIF(CheckFieldName,"Show this if Checked","Show This If False")

OR you can use that expression in the underlying query for the report

Show field name if check field is checked, if not show blank
Field: SomeNameHere: IIF([CheckFieldName],"CheckFieldName",Null)

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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