GoToPage Method (Form Object)

GoToPage Method (Form Object)

See Also         Example         Applies To

The GoToPage method moves the focus to the first control on a specified page in the active form.

Syntax

form.GoToPage pagenumber[, right, down]

The GoToPage method has the following arguments.

Argument Description
form A Form object that represents the active form.
pagenumber A numeric expression that's a valid page number for the active form.
right A numeric expression that's a valid horizontal offset (in twips) from the left side of the window to the part of the page to be viewed.
down A numeric expression that's a valid vertical offset (in twips) from the top of the window to the part of the page to be viewed.

Remarks

When you use this method to move to a specified page of a form, the focus is set to the first control on the page, as defined by the form's tab order. To move to a particular control on the form, use the SetFocus method.

You can use the GoToPage method if you've created page breaks on a form to group related information. For example, you might have an Employees form with personal information on the first page, office information on the second page, and sales information on the third page. You can use the GoToPage method to move to the desired page.

You can use the right and down arguments for forms with pages larger than the Microsoft Access window. Use the pagenumber argument to move to the desired page, and then use the right and down arguments to display the part of the page you want to see. Microsoft Access displays the part of the page that's offset from the upper-left corner of the window by the distance specified in the right and down arguments.