Office Settings & Configuration

Assign the Unhide Columns Command to an Access Form Button

Ayan MasoodAyan Masood Nov 14, 2026 868 views

Question details

The user wants an Access form button to open the dialog for unhiding columns.

Assign the Unhide Columns Command to an Access Form Button
Product
Microsoft Access
Device & OS
not provided
Scenario
A form contains a button intended to simplify unhiding fields in a table or subform datasheet.
Observed behavior
The button should open the Unhide Fields or Unhide Columns dialog for the active datasheet.
Before you start

Open the Access database and identify the table or subform datasheet whose columns you want to unhide. Confirm that the form has a command button, or add one in Design View.

Solution 1Recommended

Attach an Unhide Columns macro to the form button

Use the button's On Click event to run the same command that opens the unhide dialog from the Ribbon.

1
Open the button properties

Open the form in Design View, select the command button, and open its Property Sheet.

2
Create the click macro

On the Event tab, select the On Click property and use the ellipsis button to open Macro Builder. Choose Macro Builder if Access asks which builder to use.

3
Add the unhide command

Add the RunMenuCommand action, then select Unhide Columns in its Command setting. The command may appear as UnhideColumns in the list.

4
Save and test

Save the macro and form, switch to Form View, and click the button while the intended datasheet is active. In the dialog, select the columns to show.

Attach an Unhide Columns macro to the form button
Check the active datasheet: The command depends on context. If it is unavailable or affects the wrong datasheet, check which table or subform has focus when the macro runs.
Free Microsoft Office alternative

Work with spreadsheet columns in WPS Office

For spreadsheet work, WPS Office is a free, lightweight alternative with a familiar interface and support for common Office formats, making it easy to move existing files. It does not replace Access form buttons or run Access macros.

Show or hide spreadsheet columns in WPS Spreadsheet.Open and edit Microsoft Excel XLSX files and other common Office formats.Use a familiar interface for everyday document and spreadsheet tasks.Get started with a free, lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Which macro action opens the Unhide Columns dialog in Access?

In Macro Builder, add RunMenuCommand and select Unhide Columns, which may be listed as UnhideColumns, in the Command setting.

How do I attach the macro to a form button?

Open the form in Design View, select the button, and use the On Click property on the Property Sheet's Event tab to create or assign the macro.

Why is the Unhide Columns command unavailable from my button?

The command requires an appropriate datasheet context. Check that the intended table or subform datasheet is active when the macro runs.

Can VBA show a specific subform column instead of opening the dialog?

Yes. For a subform datasheet column, VBA can set its ColumnHidden property to False, for example: Me.SubformName.Form!ColumnName.ColumnHidden = False. Replace the names with your subform control and column names.