Table of contents

Form.CurrentSectionTop 属性 (访问)Form.CurrentSectionTop Property (Access)

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

可以使用此属性可以确定从当前节的上边缘与窗体边缘的缇在距离。读取/写入的整数You can use this property to determine the distance in twips from the top edge of the current section to the top edge of the form. Read/write Integer.


表达式CurrentSectionTopexpression. CurrentSectionTop

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


CurrentSectionTop属性,当用户滚动窗体设置的更改。The CurrentSectionTop property setting changes whenever a user scrolls through a form.

对于DefaultView属性设置为一个表单时,如果用户滚动窗口左上角的部分,该属性的上方设置值将成为负数。For forms whose DefaultView property is set to Single Form, if the user scrolls above the upper-left corner of the section, the property settings are negative values.

对于DefaultView属性设置为连续窗体,窗体如果一个节不可见, CurrentSectionTop属性等于窗体的InsideHeight属性。For forms whose DefaultView property is set to Continuous Forms, if a section isn't visible, the CurrentSectionTop property is equal to the InsideHeight property of the form.

CurrentSectionTop属性可用于查找作为连续窗体或在数据表视图中显示在窗体视图的详细信息部分的位置。每个主体节有不同的CurrentSectionTop属性设置,具体取决于在窗体节的位置。The CurrentSectionTop property is useful for finding the positions of detail sections displayed in Form view as continuous forms or in Datasheet view. Each detail section has a different CurrentSectionTop property setting, depending on the section's position on the form.


下面的示例显示CurrentSectionLeftCurrentSectionTop属性设置为连续窗体上的控件。当用户移动到新记录时,当前节的属性设置将显示在lblStatus在该窗体的标题中的标签。The following example displays the CurrentSectionLeft and CurrentSectionTop property settings for a control on a continuous form. Whenever the user moves to a new record, the property settings for the current section are displayed in the lblStatus label in the form's header.

Private Sub Form_Current() 

 Dim intCurTop As Integer 
 Dim intCurLeft As Integer 

 intCurTop = Me.CurrentSectionTop 
 intCurLeft = Me.CurrentSectionLeft 
 Me!lblStatus.Caption = intCurLeft &; " , " &; intCurTop 

End Sub

另请参阅See also


窗体对象Form Object

© 2018 Microsoft