Results 1 to 4 of 4
  1. #1
    jsimard is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    28

    Remove White Space

    I have used the following to hide record fields that are blank as well as their label.



    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.Calculation_Label.Visible = Not (IsNull(Me.Calculation))
    Me.Definition_Label.Visible = Not (IsNull(Me.Definition))
    Me.Interpretation_Label.Visible = Not (IsNull(Me.Interpretation))
    Me.StandardsBenchmark_Label.Visible = Not (IsNull(Me.StandardsBenchmark))
    Me.DataSources_Label.Visible = Not (IsNull(Me.DataSources))
    Me.SecondarySources_Label.Visible = Not (IsNull(Me.SecondarySources))
    Me.Comments_Label.Visible = Not (IsNull(Me.Comments))
    End Sub

    My report now has lines of white space where that data would have been had it not been blank. Is there a way to remove the white space?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If the Section (Detail??) has the CanShrink property set to True and each control has their CanShrink property set to True then I don't believe you need *any* of the code you have and it will work as you wish.

  3. #3
    jsimard is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    28
    This seems to work to remove the space of the text fields but the labels still appear and I would like them gone as well if there is no data. My report is designed with the label on top and then the text below:

    Definition:
    Definition Text.....

    Calculation:
    Calculation Text....

    etc...

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    In that case, re-enabling the code you had should do it.

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

Similar Threads

  1. Replies: 8
    Last Post: 08-12-2011, 11:55 AM
  2. Why The White Box?
    By orcinus in forum Access
    Replies: 3
    Last Post: 08-05-2011, 01:55 PM
  3. Stubbornly White Subform
    By jimmonator in forum Access
    Replies: 6
    Last Post: 06-18-2011, 07:22 PM
  4. Subform showing white
    By Rick West in forum Forms
    Replies: 2
    Last Post: 06-24-2010, 08:07 AM
  5. Export to RTF is creating white space at end of page
    By Sherri726 in forum Import/Export Data
    Replies: 0
    Last Post: 12-19-2006, 03:24 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