Visible Property

Applies To
Access 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, this property returns or sets whether Access is minimized. For other objects, you can use the Visible property to show or hide a form, report, form or report section, data access page, or control. This property is useful when you want to use information on a form without showing the form. For example, you can use the value of a control on a hidden form as query criteria. Read/write Boolean.

Syntax

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 a user launches an application, the Visible and UserControl properties of the Application object are both set to True. When UserControl is set to True, you can't set the object's Visible property to False.
  • When Automation (formerly called OLE Automation) creates an Application object, 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.