Form
The GoToPage method moves the focus to the first control on a specified page in the active form.
form.GoToPage pagenumber[, right, down]
The GoToPage method uses the following arguments.
Argument |
Description |
form |
A Form object that represents the active form |
pagenumber |
A numeric expression that is a valid page number for the active form |
right |
A numeric expression that is 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 is a valid vertical offset (in twips) for from the top of the window to the part of the page to be viewed |
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 have 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 application 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 which is offset from the upper-left corner of the window by the distance specified in the right and down arguments.
Form Object, GoToPage Action.
The following example uses the GoToPage method to move the focus to the second page of the Customer form at the position specified by the right and down arguments.
Forms!Customer.GoToPage 2, 1440, 600