應用該屬性可以確定從當前節(jié)的頂邊到窗體頂邊的距離,以緹為單位。
expression.CurrentSectionTop
expression 必需。返回“應用于”列表中的一個對象的表達式。
此屬性設置僅在使用宏或 Visual Basic 時使用。
用戶滾動窗體時,CurrentSectionTop 屬性的設置將會改變。
對于 DefaultView 屬性設置為“單一窗體”的窗體,當用戶將滾動條拖到窗體左上角的上方時,該屬性的值將成為負數(shù)。
對于 DefaultView 屬性設置為“連續(xù)窗體”的窗體,如果當前節(jié)不可見,那么 CurrentSectionTop 屬性與窗體的 InsideHeight 屬性值相等.
CurrentSectionTop 屬性用于查找“窗體”視圖中連續(xù)窗體的或“數(shù)據(jù)表”視圖中的主體節(jié)位置。每一個主體節(jié)都有不同的 CurrentSectionTop 屬性設置,取決于該節(jié)在窗體中的位置。
下面的示例顯示了連續(xù)窗體上一個控件的 CurrentSectionLeft 和 CurrentSectionTop 屬性設置。當用戶移到一個新記錄時,當前節(jié)的屬性設置將顯示在窗體標題的 lblStatus 標簽中。
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