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")
 

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