Show or hide a control
- Open a form, report, or data access page
in Design view.
- Select the control you want to show or hide, and then click Properties
on the
Form
Design, Report Design or Page Design toolbar to open its property sheet.
- Do one of the following:
To show or hide a control in a form or report
- In the Visible property box, click Yes or No.
To show or hide a control in a data access page
- In the Visibility property box, click Visible or Hidden.
If you want the control to inherit the Visibility property of
the section where it is located, click Inherit.
- If the control has an associated label, you must set the label's Visibility
property separately.
Note To specify whether a column is visible in Datasheet view
of a form, use the ColumnHidden property.
Tips
- On forms and reports, to hide or unhide a control in response to an event, you can use a
macro
or event procedure to set the Visible property. Attach the macro or event procedure to the OnCurrent property of a form or the OnFormat property of a report. 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.
- To hide a section or control on a form only when you are printing, use the DisplayWhen property.