Export (0) Print
Expand All

CurrentSectionTop Property [Access 2003 VBA Language Reference]

Office 2003

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.

expression.CurrentSectionTop

expression Required. An expression that returns one of the objects in the Applies To list.

Remarks

This property setting is available only by using a macro or Visual Basic .

The CurrentSectionTop property setting changes whenever a user scrolls through a form.

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.

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.

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.

Example

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
		


Applies to | Form Object



Show:
© 2014 Microsoft