Table of contents

ComboBox.IsVisible 属性 (访问)ComboBox.IsVisible Property (Access)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

IsVisible属性可用于确定报表上的控件是否可见。读/写boolean 类型的值You can use the IsVisible property in to determine whether a control on a report is visible. Read/write Boolean.


表达式IsVisibleexpression. IsVisible

表达式_表示组合框对象变量。_expression A variable that represents a ComboBox object.


请注意 您可以设置IsVisible属性仅在包含该控件的报表节的Print事件。Note You can set the IsVisible property only in the Print event of a report section that contains the control.

IsVisible属性和隐藏属性可用于确定报表上的控件可见以及显示或隐藏其他控件的结果。例如,可以隐藏线条控件隐藏文本框控件时,因为它包含重复的值。You can use the IsVisible property together with the HideDuplicates property to determine when a control on a report is visible and show or hide other controls as a result. For example, you could hide a line control when a text box control is hidden because it contains duplicate values.


下面的示例使用文本框的IsVisible属性以控制报表上的直线控件的显示。TThe following example uses the IsVisible property of a text box to control the display of a line control on a report. T

将以下代码粘贴到报表模块的声明部分,然后查看报表查看IsVisible属性所控制的线条格式:Paste the following code into the Declarations section of the report module, and then view the report to see the line formatting controlled by the IsVisible property:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) 
 If Me!CategoryID.IsVisible Then 
 Me!Line0.Visible = True 
 Me!Line0.Visible = False 
 End If 
End Sub

另请参阅See also


组合框对象ComboBox Object

© 2018 Microsoft