How to Remove Empty Space Between Dynamic Access Form Controls
Question details
The user wants to eliminate large blank areas left by hidden dynamic controls in a Microsoft Access data entry form.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Designing a dynamic form where up to 20 controls are shown or hidden based on a numerical value entered in an unbound text box.
- Observed behavior
- When controls are hidden by setting their Visible property to False, Access does not automatically reflow the layout, leaving large, unsightly empty gaps on the form.
Before adjusting your form's layout and properties, verify that your underlying database tables are properly normalized, as a high number of variable fields may indicate the need for a relational child table.
Use a Tab Control for Field Groups
Grouping controls onto separate tab pages prevents white space issues without requiring complex VBA code for manual repositioning.
Since Access forms use absolute positioning, controls will not automatically slide up to fill the void left by a hidden control. Using a Tab Control allows you to organize inputs cleanly.
Open your form in Design View, select the Tab Control from the Form Design toolbar, and draw it onto your form.
Cut your existing variable controls and paste them into the appropriate pages of the Tab Control based on logical groupings.
Add VBA code to the After Update event of your unbound text box to dynamically change the Tab Control's Value property, focusing on the correct page based on user input.

Use a Dialog Form for Variable Fields
Instead of hiding and showing controls on a single form, open a dynamic dialog form tailored to the required inputs.
Redesign Using Related Tables and a Subform
If the variable controls represent multiple similar items or attributes, using a related table is a better database design.
Manage Your Data with WPS Office
While WPS Office does not feature a direct Microsoft Access clone, WPS Spreadsheet offers powerful data management, pivot tables, and built-in form views. It is a lightweight, free alternative for users who want to organize extensive data sets without dealing with complex VBA or absolute form layouts.
- 1. Download WPS Office: Visit the official WPS website to download and install the free suite.
- 2. Import Your Data: Export your Access tables to Excel or CSV formats, then open them instantly in WPS Spreadsheet.
- 3. Use Built-in Forms: Utilize WPS Spreadsheet's Data Form feature for a clean, gap-free data entry experience without coding.

Frequently Asked Questions
Why doesn't Access automatically close the gap when a control is hidden?
Microsoft Access forms use absolute positioning for controls. Hiding a control by setting its Visible property to False simply makes it invisible, but it retains its physical physical coordinates on the form layout, leaving a blank space.
Can I use VBA to dynamically reposition controls in Access to remove spaces?
Yes, you can write VBA code to adjust the Top and Left properties of your visible controls during the form's On Current or After Update events. However, this requires writing and maintaining complex positioning logic for every control.
Is it possible to use a continuous form to avoid blank spaces entirely?
Yes. Normalizing your database structure and using a continuous subform allows Access to stack records dynamically. The subform will only display rows for data that exists, naturally eliminating large empty spaces.




