You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何让Access 2016中最小化的窗体在主窗体左下角显示

Fix for Minimizing Subforms to Main Form's Bottom Left in Access 2016

Hey Stephen, I’ve dealt with this exact frustration in Access 2016—total bummer that the older versions handled this so smoothly, right? The good news is this is totally fixable with a few settings tweaks and optional VBA to polish the behavior. Here’s how to get those subforms docking to your frmMainMenu’s bottom left like the VBA editor windows:

Step 1: Enable MDI (Overlapping Windows) Mode in Your Database

Access 2016 defaults to "Tabbed Documents" mode, which locks forms into tabs instead of letting them act as independent child windows. Switching to overlapping windows turns your database into an MDI container, so subforms stay within the main form’s window:

  • Open your database, go to File > Options > Current Database
  • Under Application Options, find Document Window Options and select Overlapping Windows
  • Check the box for Show Document Window Toolbar (this helps manage child windows)
  • Click OK, then close and reopen your database to apply the change

Step 2: Adjust Subform Properties

Your frmAddRecords and frmReports need to be configured to behave as MDI child windows. Open each in Design View and tweak these properties in the Property Sheet (press F4 if it’s not visible):

  • Format Tab:
    • Set Pop Up to No (pop-up forms break out of the main window container)
    • Set Modal to No (modal forms block interaction with the main form and won’t dock correctly)
    • Set Border Style to Sizable or Thin Border (avoid "None" or "Dialog Border"—these don’t support proper minimization)
    • Ensure Minimize Button is set to Yes

Step 3: Optional VBA to Lock Minimized Position to Main Form’s Bottom Left

If you want the minimized subforms to snap exactly to frmMainMenu’s bottom left (instead of just staying inside the main window), add this code to each subform’s module:

Private Sub Form_Resize()
    ' Only run when the form is minimized
    If Me.WindowState = acMinimized Then
        Dim mainForm As Form
        ' Make sure the main form is loaded
        If CurrentProject.AllForms("frmMainMenu").IsLoaded Then
            Set mainForm = Forms("frmMainMenu")
            ' Move the minimized form to the main form's bottom left
            ' Adjust the height value (30) if your system's minimized window height is different
            Me.Move mainForm.Left, mainForm.Top + mainForm.Height - 30, , 30
        End If
    End If
End Sub

This code triggers whenever the subform is resized, and repositions it to the main form’s bottom left as soon as it’s minimized.

Why Your Previous Settings Didn’t Work

Chances are you had the database set to Tabbed Documents mode, which overrides any child window behavior. Also, if your subforms were set to Pop Up or Modal, they’ll always float independently of the main form—those properties are the most common culprits here.

Note on Windows 8.1

Win8.1 shouldn’t affect this functionality at all—Access 2016’s MDI mode works the same across Windows 7, 8.1, and 10. The issue is definitely in the database/form settings, not your OS.

If you still run into trouble, double-check that frmMainMenu is loaded before opening the subforms (you can set it as your startup form in the Current Database options), and make sure no other VBA code is overriding the WindowState or Pop Up properties of your subforms.

内容的提问来源于stack exchange,提问作者sgldjj

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 10:17:35