title: Resize form in MS Access by changing Detail.Height
body: <p>I want the user to be able to change the height of the form while in Form View by clicking a button:  </p>
  
  <pre class="lang-vb prettyprint-override"><code>Private Sub btnChangeHeight_Click()
  
      booTall = Not booTall
  
      If booTall Then
          lngHeight = 12400   ' (twips)
      Else
          lngHeight = 1200
      End If
  
      Me.Detail.Height = lngHeight
      Me.Repaint
  
      Debug.Print Me.Detail.Height
  
  End Sub
  </code></pre>
  
  <p>The height changes -- <code>Debug.Print</code> says so, and a vertical scroll bar appears when <code>booTall</code> is <code>True</code>.  <strong>But the form won't change its vertical dimension onscreen.</strong></p>
  
  <p>I also tried this, without success (making sure my button was on the Form header):</p>
  
  <pre><code>    Me.Detail.Visible = booTall
  </code></pre>
  
  <p>The solution would seem to depend on properties for the Form and Form Detail section: <em>Resizable</em>, <em>Auto Height</em>, perhaps <em>Can Grow</em>, etc.  But I've fiddled with those and nothing works.  </p>
  
  <p>I understand overlapping controls and other things can prevent height adjustments, so I've reduced the form to a minimal layout.  I'm using Access version 2007/2010.</p>
  
  <p><strong>Some additional info:</strong>  What I actually am working toward is two subforms, (A) above and (B) below, which can independently be collapsed out of view or expanded.  This is for a decision-making form with a LOT of data on it.  I thought if I collapsed the height of (A) or (B), the <code>CanShrink</code> property of <code>Detail</code> would cause the overall form dimension to change.  In fact, I think I did this a few years ago using Access 2003.  As for using Maximize ... we're setting up this form as re-usable, multiple instances can open.</p>