Conditionally hide detail and footer

Posted on 2007-07-31
Last Modified: 2013-11-28
I have a report is grouped by employee number. In the group footer I have a sum of total hours. I would like the detail and footer to be hidden if the total hours are under 100. How do I code this.
Question by:Serena2345
    1 Comment
    LVL 84

    Accepted Solution

    How are you determining Total Hours? If this is a calculated field (i.e. you're doing this in the Report, perhaps with a Running Sum) then you may not get the results you're looking for.

    You can try doing this in both the Detail and Footer's Format event;

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
      Me.Detail.Visible = Me.TotalHours<100
    End Sub


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    745 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