You can use the GoToPage action to move the focus in the active form to the first control on a specified page. You can use this action if you have created a form with page breaks that contains groups of related information. For example, you might have an Employees form with personal information on one page, office information on another page, and sales information on a third page. You can use the GoToPage action to move to the desired page.
The GoToPage action uses the following arguments.
Action argument |
Description |
Page Number |
The number of the page to which you want to move the focus. If you leave this argument blank, the focus stays on the current page. You can use the Right and Down arguments to display the part of the page you want to see. |
Right |
The current horizontal position of the spot on the page, measured from the left edge of its containing window, that is to appear at the left edge of the window. This is required if you specify a Down argument. |
Down |
The current vertical position of the spot on the page, measured from the top edge of its containing window, that is to appear at the top edge of the window. This is required if you specify a Right argument. |
Note The Right and Down measurements are in inches or centimeters, depending on the units set for Measurement system on the Number tab of the Regional Settings Properties dialog box in the Microsoft Windows Control Panel.
You can use this action to select the first control (as defined by the form’s tab order) on the specified page. Use the GoToControl action to move to a particular control on the form.
You can use the Right and Down arguments for forms with pages larger than the Microsoft Access window. Use the Page Number 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.
You can’t use the GoToPage action to move the focus to a page on a hidden form.
To run the GoToPage action in Visual Basic, use the GoToPage method of the DoCmd object.
GoToControl Action, GoToPage Method (DoCmd Object), GoToRecord Action, SelectObject Action, TabStop Property.