title: fitting forms to various screen settings in ms access 2010
body: <p>I have a set of two nested navigation subforms in an ms access 2010 database. The problem is that, when different users on different machines view the database through different screen resolutions and text size settings, the forms can have silly wastes of screen real estate, such as in the following image:  </p>
  
  <p><img src="https://s22.postimg.org/vjjr1sawx/needresize.gif">  </p>
  
  <p><strong><em>How do I set the width and height of each navigation subform so that each of the two navigation subforms has a small inset (30 pixels?) at the right and bottom, assuming that the left and top are fixed?</em></strong>  </p>
  
  <p>Here is the code that I worked up so far, but it pushes things too far to the right and to the bottom, without leaving the insets that I need at the right and bottom:  </p>
  
  <pre><code>Main form (this is the outermost form):  
  
  Private Sub Form_Resize()
      On Error Resume Next
      Me.NavigationSubform.Width = Me.WindowWidth - (Me.NavigationSubform.Left + 10)
      Me.NavigationSubform.Height = Me.WindowHeight - (Me.NavigationSubform.Top + 10)
  End Sub
  
  FindClientsNavigation form (this is the second level form):  
  
  Private Sub Form_Resize()
      On Error Resume Next
      Me.NavigationSubform.Width = Me.WindowWidth - (Me.NavigationSubform.Left + 10)
      Me.NavigationSubform.Height = Me.WindowHeight - (Me.NavigationSubform.Top + 10)
  End Sub
  </code></pre>
  
  <p>I uploaded a simplified version of the database with enough to recreate the problem <a href="https://jumpshare.com/v/7UA32Xw7iUtQ2lDY1ouA" rel="nofollow noreferrer">at this file sharing site</a>.  </p>
  
  <p>If you want to recreate the problem on your pc after downloading the database, you can set the windows text size property using the following dialog in the control panel:  </p>
  
  <p><img src="https://s27.postimg.org/cnqbq5qpv/textsize.gif"></p>