Bound Object Frame Control, Chart Control, Check Box Control, Combo Box Control, Command Button Control, Form, Form Section, Image Control, Label Control, Line Control, List Box Control, Option Button Control, Option Group Control, Page Break Control, Rectangle Control, Report, Report Section, Subform/Subreport Control, Text Box Control, Toggle Button Control, Unbound Object Frame Control.
You can use the Visible property to show or hide a form, report, form or report section, 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.
The Visible property uses the following settings.
Setting |
Description |
Visual Basic |
Yes |
(Default) The object is visible. |
True (-1) |
No |
The object is not visible. |
False (0) |
You can set this property using the object’s property sheet (for sections and all controls except page breaks), a macro, or Visual Basic.
For forms and reports you must set this property using a macro or Visual Basic.
For controls, you can set this property using the default control style.
The Visible property has no effect on a column in Datasheet view. To specify whether a column is visible in Datasheet view, you use the ColumnHidden property.
To hide an object when printing, you use the DisplayWhen property.
You can use the Visible property to hide a control on a form by including the property in a macro 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.
Note There is also a Visible property of the Application object that can be set to cause the application to be invisible. This property can only be set using Visual Basic.
Current Event, Format Event, Transparent Property, Visible Property (Application Object).