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've 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. You can also present multiple pages of information on a single form by using tab controls.
Setting
The GoToPage action has the following arguments.
Action argument | Description |
---|---|
Page Number | The number of the page to which you want to move the focus. Enter the page number in the Page Number box in the Action Arguments section of the Macro window. 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 horizontal position of the spot on the page, measured from the left edge of its containing window, that's to appear at the left edge of the window. This is required if you specify a Down argument. |
Down | The vertical position of the spot on the page, measured from the top edge of its containing window, that's to appear at the top edge of the window. This is required if you specify a Right argument. |
Note The Right and Down arguments 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 Windows Control Panel.
Remarks
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. Microsoft Access displays the part of the page whose upper-left corner is offset the specified distance from the upper-left corner of the page.
You can't use the GoToPage action in the following cases:
To run the GoToPage action in Visual Basic, use the GoToPage method of the DoCmd object.