Applies ToAccess for Microsoft 365 Access 2024 Access 2021 Access 2019 Access 2016

Applies to

Application Object

DataAccessPage Object

ObjectFrame Object

Report Object

BoundObjectFrame Object

Form Object

OptionButton Object

Section Object

CheckBox Object

Image Object

OptionGroup Object

SubForm Object

ComboBox Object

Label Object

Page Object

TabControl Collection

CommandButton Object

Line Object

PageBreak Object

TextBox Object

CustomControl Object

ListBox Object

Rectangle Object

ToggleButton Object

When used with the Application object, returns or sets whether an Access application is minimized. You can also use the Visible property to show or hide a form, report, form or report section, data access page, or control. This may be useful if you want to maintain access to information on a form without it being visible. For example, you could use the value of a control on a hidden form as the criteria for a query. Read/write Boolean; True if visible/minimized, False if not visible/not minimized.

expression.Visible

expression Required. An expression that returns one of the objects in the Applies To list.

Remarks

For the Application object:

  • You can set the Visible property of the Application object only by using Visual Basic for Applications (VBA) code.

  • When an application is launched by the user, the Visible and UserControl properties of the Application object are both set to True. When the UserControl property is set to True, it isn't possible to set the Visible property of the object to False.

  • When an Application object is created by using Automation (formerly called OLE Automation), the Visible and UserControl properties of the object are both set to False.

For all other objects:

  • You can set this property by using the object's property sheet (for sections and all controls except page breaks), a macro, or Visual Basic.

  • For forms, reports, and data access pages, you must set this property by using a macro or VBA.

  • For controls, you can set the default for this property by using the default control style or the DefaultControl property in VBA.

  • The Visible property has no effect on a column in Datasheet view. To specify whether a column is visible in Datasheet view, use the ColumnHidden property.

  • To hide an object when printing, use the DisplayWhen property.

  • You can use the Visible property to hide a control on a form or report by including the property in a macro or event procedure that runs when the Current event occurs. For example, you can show or hide a congratulatory message next to a salesperson's monthly sales total in a sales report, depending on the sales total.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.