Others

How to Show or Hide the Main Microsoft Access Database Window

Kushani NimanthikaKushani Nimanthika Oct 29, 2026 868 views

Question details

The user wants to display a pop-up form while hiding or repositioning the main Microsoft Access application window, keeping the ribbon and navigation pane intact.

How to Show or Hide the Main Microsoft Access Database Window
Product
Microsoft Access
Device & OS
not provided
Scenario
Designing a custom database interface where only a specific pop-up form is visible to the end-user.
Observed behavior
Access does not have a built-in command to hide only the main application window without affecting the ribbon or navigation pane.
Before you start

Ensure you have a backup copy of your Access database before implementing Windows API calls, as incorrect VBA code can cause the application to crash or become inaccessible.

Solution 1Recommended

Use Windows API Calls to Hide or Reposition the Access Window

Since Access lacks a native feature for this, you must use Windows API functions in VBA to manipulate the main application window.

Microsoft Access is not natively designed to hide its main background window while keeping pop-up forms active. To achieve this, advanced developers use Windows API calls (such as ShowWindow) to push the main Access window behind a customized pop-up form.

This method requires writing VBA code in a standard module and calling it when the database opens. It is highly recommended to include a method for restoring the window to perform future design edits.

1
Create a Pop-up Form

Open your database, create a new form, and navigate to the Property Sheet. Set both its 'Pop Up' and 'Modal' properties to 'Yes'.

2
Add API Code to a Module

Open the VBA Editor (Alt + F11), insert a new Module, and declare the Windows API function (e.g., Declare PtrSafe Function ShowWindow Lib "user32").

3
Configure the Form Load Event

Add VBA code to your pop-up form's 'On Load' event to trigger the API call, effectively hiding or minimizing the Application.hWndAccessWindow.

4
Provide a Restore Button

Add a command button on your pop-up form that calls the API again to restore the main window when design access is needed.

Use Windows API Calls to Hide or Reposition the Access Window
Advanced Implementation: Working with Windows API requires a solid understanding of VBA. If you are using 64-bit Office, ensure your API declarations include the 'PtrSafe' keyword.
Free Microsoft Office alternative

Looking for a Lightweight and Free Office Suite?

While Microsoft Access handles complex databases requiring API calls, most daily office tasks don't need such complexity. WPS Office provides a free, lightweight, and highly compatible alternative for your document, spreadsheet, and presentation needs with a familiar user interface.

  1. 1. Download WPS Office: Visit the official WPS website and click the free download button.
  2. 2. Install the Software: Run the installer and follow the on-screen instructions to set up WPS Office on your computer.
  3. 3. Open Your Files: Launch WPS Office and easily open any existing .docx, .xlsx, or .pptx files.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats.Lightweight application that uses minimal system resources.Familiar tabbed user interface for seamless migration from MS Office.Built-in PDF reader and editor for comprehensive document management.
microsoft office alternative - wps office

Frequently Asked Questions

Can I hide the Access window without using VBA?

No, Microsoft Access does not provide a built-in macro or menu option to completely hide the main background window. VBA and Windows API calls are strictly required.

Why does hiding the Access window also hide the ribbon?

The ribbon and navigation pane are child objects of the main Access application window. If you completely hide the main window using API calls, all child objects attached to it are hidden as well.

How do I get my Access window back if it gets stuck hidden?

If you accidentally hide the window and cannot restore it, you can force close Access via the Windows Task Manager (Ctrl+Shift+Esc), then reopen your database while holding the Shift key to bypass the startup form and API calls.

Does this API method work in both 32-bit and 64-bit Access?

Yes, but the VBA code must be adapted. For 64-bit Access, you must use the 'PtrSafe' keyword in your API declarations and use LongPtr for handles to prevent memory errors.