Log in

View Full Version : Visible/hidden Yes/No fields in a Report (Access 2010)



HealdsburgCA
09-13-2012, 09:52 AM
Greetings,

I’m building a report [rptResoIndex] which contains 8yes/no fields (check boxes). I started off working to get the report to only show the check boxes that are active/true and hide thecheck boxes that are not active/false. But as I was working towards this I realized I really don’t need the check boxes. It would be ideal if thereport used a text box and showed only the names designated for each field thatis True, while all False fields are hidden. To go one step further it would be even better if when visible the names appearedin the same location on the report (as in using the same textbox, not eighttext boxes with the data appearing to jump around/appear & disappear as theuser scrolls through the report).

This seems like a tall order, is it possible for a reportto do what I’m hoping?

Table name:

[tblReso_Index]

“Name Designation” and [Field Name]:

“Administration” [DeptAdmin]
“Community Services”[DeptCommSrvc]
“Fire”[DeptFire]
“Police”[DeptPolice]
“Planning & Building” [DeptPlanBldg]
“Public Works” [DeptPW]
“Electric” [DeptElect]
“Finance”[DeptFin]

Thank you in advance for the help!

-Joshua

HealdsburgCA
09-17-2012, 03:48 PM
I'm new to expressions and all, I pieced it together and this works fine:

=IIf([DeptAdmin]=True,"Administration ") & IIf([DeptCommSrvc]=True,"CommSrvc ") & IIf([DeptElect]=True,"Electri c") & IIf([DeptFin]=True,"Finance ") & IIf([DeptFire]=True,"Fire ") & IIf([DeptPolice]=True,"Police ") & IIf([DeptPlanBldg]=True,"Planning/Bldg ") & IIf([DeptPW]=True,"Public Works")

Thanksfor the help.

-Joshua