title: Dynamically resize a report Detail area
body: <p>Is it possible to resize the Detail area of a report dynamically, in MS Access?</p>
  
  <p>I have a report and the Detail region has 2 rows, I'd like one of them to be "optional" - when there is no data it should not display and the Detail region should only be as tall as the top row of data.</p>
  
  <p>I have code like this:</p>
  
  <pre><code>Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
      Dim reduceHeight As Integer
      reduceHeight = Me.Label83.Height
  
  
      If IsNull(Me.data_1) Then
          Me.data_1.Visible = False
          Me.Label83.Visible = False
      Else
          Me.data_1.Visible = True
          Me.Label83.Visible = True
      End If
  
      If IsNull(Me.data_1) 
          Detail.Height = Detail.Height - reduceHeight
      End If
  
  End Sub
  </code></pre>
  
  <p>And it works as far as makign the label and text box conditionally visible, but I can't get the Detail region to shrink when the bottom line is hidden. I <em>did</em> set the <code>CanShrink</code> property for the Detail to <code>True</code>, but it doesn't shrink.</p>