共用方式為


Access) (Form.CurrentSectionTop 屬性

使用此屬性來判斷從目前區段上邊緣到表單上邊緣的 Twip 距離。 可讀寫的 Integer

語法

運算式CurrentSectionTop

expression 代表 Form 物件的變數。

註解

當使用者捲動表單時,CurrentSectionTop 屬性值會改變。

如果表單的 DefaultView 屬性設定為單一表單,如果使用者捲動區段左上角上方,則屬性設定值為負值。

如果表單的 DefaultView 屬性設定為連續表單,如果看不到區段, 則 CurrentSectionTop 屬性等於表單的 InsideHeight 屬性。

CurrentSectionTop 屬性很適於用來尋找顯示在表單檢視中做為連續表單的詳細資料區段或資料工作表檢視的詳細資料區段之位置。 每一詳細資料區段有不同的 CurrentSectionTop 屬性設定值,端視表單中區段的位置而定。

範例

下列範例會顯示連續表單上控制項的 CurrentSectionLeftCurrentSectionTop 屬性設定。 無論使用者何時移動至新的記錄,目前區段的屬性設定值會顯示在表單頁首的 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

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應