Export (0) Print
Expand All

Visible Property [Access 2003 VBA Language Reference]

Office 2003

When used with the Application object, returns or sets whether a Microsoft 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.

  • 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 Visual Basic.

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

  • 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.





Show:
© 2014 Microsoft