Show selected detail records only?

  • Thread starter Thread starter Slez via AccessMonster.com
  • Start date Start date
S

Slez via AccessMonster.com

In a report, is it possible to only show the records in the detail section
when a certain value is met?

I have a report with a group for "CBDCodeID" in which I have a footer that
displays the sum of a control in the detail section. I would only want the
details to be displayed if CBDCodeID = 4, 8, or 14.

I currently have the detail section's Visible property set to "No", and only
want it to be visible if the above values exist.

Suggestions are appreciated!
Slez
 
Slez said:
In a report, is it possible to only show the records in the detail section
when a certain value is met?

I have a report with a group for "CBDCodeID" in which I have a footer that
displays the sum of a control in the detail section. I would only want the
details to be displayed if CBDCodeID = 4, 8, or 14.

I currently have the detail section's Visible property set to "No", and only
want it to be visible if the above values exist.


Try adding a text box named txtShow to the group header
section. Set its control source expression to:
=Count(IIf(CBDCodeID IN(4, 8, 14), 1, Null))

Then use a line of code in the header section's Format event
procedure:
Me.Section(0).Visible = (Me.txtShow > 0)
 
Back
Top