Access/VBA Library

MoveTo_TopLeft

Moves a form to the left at the top of the screen.

Syntax

MoveTo_TopLeft( frm [, offsetX] [, offsetY] )
Parameters
Name Type Description
frm Form Required. Reference to the active form to be moved.
offsetX Long Optional. Offset in twips of left of the form.
Default: 0
offsetY Long Optional. Offset in twips of top of the form.
Default: 0
Code
Public Sub MoveTo_TopLeft(frm As Form, _
                              Optional ByVal offsetX As Long = 0, _
                              Optional ByVal offsetY As Long = 0)
    With frm
        DoCmd.MoveSize offsetX, offsetY
    End With
End Sub