Table of contents
TOC
折叠目录
展开目录

SubForm.IsVisible 属性 (访问)SubForm.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.

语法Syntax

表达式IsVisibleexpression. IsVisible

表达式_一个表示子窗体对象的变量。_expression A variable that represents a SubForm object.

注解Remarks

请注意 您可以设置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.

示例Example

下面的示例使用文本框的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 
 Else 
 Me!Line0.Visible = False 
 End If 
End Sub

另请参阅See also

概念Concepts

子窗体对象SubForm Object

© 2018 Microsoft