Subreport visability based on query

  • Thread starter bhipwell via AccessMonster.com
  • Start date
B

bhipwell via AccessMonster.com

Hello,

I have a report with a query as the Record Source. I would like subreports
to be visible or not visible based on the returned data on the main reports
control source, the query.

For example, if the query says "No" to field "A", then I don't want the
corresponding subreport to be visible. If "Yes", then the subreport should
be visible.

How do I do this?

Thanks!

BH
 
D

Duane Hookom

You would add code to the On Format event of the section of the report that
contains a control bound to field "A" and the subreport. Your code might look
like:
Me.CorrespondingSubReport.Visible = (Me.txtA <>"No")
 
Top