Results 1 to 5 of 5
  1. #1
    hfreedman1957 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2017
    Posts
    35

    Hide Report Fields based on values in each record

    Hi,


    On a record by record basis, I want to hide report detail fields based on the value in other detail Boolean field values. I have the code to check on the values and set the Visible attribute, I just don't know where to put it. Any help is appreciated. Thanks so much!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    It would go in the detail section's format event.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Visible or not, the control still occupies space.

    Detail format only triggers for printing or PrintPreview, not ReportView.

    Might just use IIf() expressions in textboxes that return Null under specified conditions.
    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.

  4. #4
    hfreedman1957 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2017
    Posts
    35
    I'm fine with the non-displayed controls occupying space. It's a matrix of booleans so I wouldn't want space compression. I only need it for printing. The report is a carbon copy of the form I use to enter the values. I only need the report for printing. It sounds like the format event is the answer. I'll try it in the morning when I'm back at work. Thanks so much.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Hide/Show fields at Form based on checkbox
    By cap.zadi in forum Forms
    Replies: 8
    Last Post: 04-22-2016, 05:08 AM
  2. Sum fields to hide zero values
    By Sparkwoodand21 in forum Queries
    Replies: 9
    Last Post: 04-07-2015, 05:23 PM
  3. Show/Hide Fields based on criteria.
    By jtm013 in forum Queries
    Replies: 6
    Last Post: 08-14-2014, 08:05 AM
  4. Replies: 7
    Last Post: 02-20-2014, 01:24 PM
  5. Hide Fields With Null Values
    By jay in forum Reports
    Replies: 6
    Last Post: 09-22-2011, 07:23 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