Results 1 to 2 of 2
  1. #1
    hawkins is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    82

    Hide Subreport if specific fields are empty

    I have a subreport based on a query that contains specific fields from the tables. I would like to be able to hide this subreport if the specific fields are empty. The whole record may not be empty so it needs to become invisibile if only the specific fields are empty. Do you have any suggestions on how to do this?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    What you need to do is hide the subreport container control. So in the Detail section Format event of the main report, something like:

    Me.subreportcontainername.Visible = IsNull(Me.subreportcontainername!fieldname)

    I always give the subform/subreport container control a name different from the object it holds.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 11-20-2011, 01:08 PM
  2. Hide SubReport
    By TinaCa in forum Programming
    Replies: 6
    Last Post: 09-15-2011, 08:03 PM
  3. Subreport will not show specific data
    By mitchy1111 in forum Reports
    Replies: 1
    Last Post: 05-18-2011, 07:36 AM
  4. Empty Subreport
    By runbear in forum Reports
    Replies: 5
    Last Post: 04-23-2011, 12:26 PM
  5. Show Hide Subreport / acViewReport
    By BigBear in forum Reports
    Replies: 4
    Last Post: 03-30-2009, 06:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums