Exclude a page in a report

Posted on 2011-05-10
Last Modified: 2012-05-11
Hi Experts,

Hopefully this will be a fairly simple one....

I have a report containing a sub-report, e.g:

        Category 1 details
        Category 4 details
        Category 7 details

I need to have an optional page in the report if a particular Category is present, say 4 in this example.

What is the best way to check the sub-report recordset to see if Category 4 is present (it won't always be) - do I need to loop thru the recordset when the report is opened to check if there is a Category 4 record or is there an easier way to do this?
Question by:redpoppy
    LVL 22

    Accepted Solution

    At the footer of your subreport you could add a (hidden) control with a source like:
    Than on the main report you could refer to the value on this control on the subreport in code like this!ctrname.value
    If this doesn't help could you upload a sample database with some data and the sub and main report as you have it now.

    Author Closing Comment

    Thanks - that works a treat.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now