Show selected detail records only?

  • Thread starter Slez via AccessMonster.com
  • 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
 
M

Marshall Barton

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)
 

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