Fix Gray Band Below an Access Form After Resizing
Question details
Users need to remove a horizontal gray band that appears at the bottom of an Access 2021 form when it is maximized and resized.

- Product
- Microsoft Access 2021
- Device & OS
- not provided
- Scenario
- Maximizing and resizing a form where NavigationButtons is set to False and ScrollBars is set to Horizontal Only or Both.
- Observed behavior
- A visual glitch consisting of a horizontal gray band is displayed below the form's content when a horizontal scrollbar is triggered.
Verify that your form properties have NavigationButtons set to False and ScrollBars enabled, and ensure you have access to edit the form's VBA code in Design View.
Refresh Scrollbar Settings via the Form Resize Event
Use a VBA workaround to dynamically remove and reapply the scrollbar settings when the form is resized, preventing the gray band from rendering.
This visual glitch is related to how Access calculates the window frame when navigation buttons are hidden but scrollbars are active. By rapidly toggling the scrollbar property during the form's Resize event, you force Access to redraw the window frame correctly without the gray band.
Right-click your form in the navigation pane and select 'Design View' to access the form properties.
Press F4 to open the Property Sheet, navigate to the 'Event' tab, find the 'On Resize' property, and click the ellipsis (...) button.
Select 'Code Builder' from the prompt to open the VBA editor for this specific form.
Inside the Private Sub Form_Resize() block, enter two lines of code: first 'Me.ScrollBars = 0' (to turn them off), then 'Me.ScrollBars = 3' (to turn both on) or your preferred scrollbar setting.
Save your VBA module, close the editor, switch your form back to 'Form View', and resize the window to verify the gray band no longer appears.

Switch to WPS Office for a Seamless Productivity Experience
If you are tired of dealing with visual glitches and bulky database interfaces, consider simplifying your workflow. WPS Office provides a free, lightweight, and easy-to-use alternative for managing your data via spreadsheets, ensuring seamless migration and a familiar UI.
- 1. Download WPS Office: Visit the official WPS website to download and install the free Office suite.
- 2. Export Access Data: Export your Microsoft Access tables and queries into CSV or Excel formats.
- 3. Open in WPS Spreadsheet: Launch WPS Spreadsheet and open your exported files to manage your data using advanced pivot tables and built-in data forms.

Frequently Asked Questions
Why does the gray band appear in Access forms?
It is a known rendering glitch in Microsoft Access 2021 that triggers when resizing a form that has Navigation Buttons disabled and Horizontal Scrollbars enabled, confusing the window's bounding box calculation.
Will this VBA fix impact form performance?
No, resetting the scrollbar properties via the Me.ScrollBars command executes instantaneously during the resize event and does not noticeably affect form performance or database load times.
What does Me.ScrollBars = 3 mean in Access VBA?
In Access VBA, the ScrollBars property accepts integer values. Setting it to 3 enables both horizontal and vertical scrollbars, while setting it to 0 disables them completely. Values 1 and 2 correspond to Horizontal Only and Vertical Only, respectively.




