Results 1 to 7 of 7
  1. #1
    mkfloque is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    24

    Hide multiple fields in report detail section if no data

    Good Day All,

    I 've figured out how to hide ONE field (called "WorkshopDeadline"):

    ********************************
    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If IsNull(Me.WorkshopDeadline) Then
    Me.WorkshopDeadline.Visible = False
    Else
    Me.WorkshopDeadline.Visible = True


    End If


    End Sub



    ********************************
    But how do i hide more than one field?
    Thank you!

  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,521
    You can repeat the If/Then/Else block for other fields. You might also check out the Can Shrink property.
    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,898
    Are the controls arranged horizontally? Even though not visible, doesn't the control still occupy space resulting in blank area on report?
    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
    mkfloque is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    24
    Thank you Paul. Do i need to open a new sub procedure? Or just place the code within the current sub procedure?

  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,521
    Quote Originally Posted by mkfloque View Post
    Thank you Paul. Do i need to open a new sub procedure? Or just place the code within the current sub procedure?
    You can add to the existing sub:

    If...
    End If

    If...
    End If
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    mkfloque is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    24
    Thank you Paul, solved!

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    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. Columns in Report Detail Section only
    By gg80 in forum Reports
    Replies: 10
    Last Post: 08-03-2014, 07:41 PM
  2. Replies: 6
    Last Post: 03-26-2013, 12:17 PM
  3. Replies: 1
    Last Post: 02-24-2012, 12:36 PM
  4. Count in detail section of a report
    By ccordner in forum Reports
    Replies: 9
    Last Post: 02-08-2012, 06:55 AM
  5. Replies: 1
    Last Post: 10-11-2009, 08:31 PM

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