次の方法で共有


GoToPage マクロ アクション

適用先: Access 2013、Office 2013

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. また、タブ コントロールを使用すると、1 つのフォーム上で複数のページに情報を表示することもできます。

設定

"GoToPage/ページの移動" アクションの引数は次のとおりです。

アクションの引数

説明

ページ番号

フォーカスを移動するページの番号。 [マクロ ビルダー] ウィンドウの [アクション引数] セクションの [ページ番号] ボックスにページ番号を入力します。 この引数を指定しないと、フォーカスはカレント ページにとどまります。 Right 引数と Down 引数を使用して、表示するページの一部を表示できます。

Right

ページの左端を表示する水平方向の位置を、そのページを表示するウィンドウの左端からの距離で指定します。 "Down/下" 引数を指定する場合は、この引数は省略できません。

Down

ページの上端を表示する垂直方向の位置を、そのページを表示するウィンドウの上端からの距離で指定します。 "Right/右" 引数を指定する場合は、この引数は省略できません。

注:

"Right/右" 引数と "Down/下" 引数は、インチまたは cm 単位で指定します。どちらの単位を使用するかは、Windows コントロール パネルの地域の設定によって決まります。

注釈

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.

Access ウィンドウより大きいページがあるフォームでは、 Right 引数と Down 引数を使用できます。 " Page Number/ページ番号 " 引数を使用して目的のページに移動し、次に " Right/右 " 引数と " Down/下 " 引数を使ってページの必要な部分を表示します。 このとき、ウィンドウの左上隅から、引数で指定した間隔を置いた位置に、ページの左上隅が表示されます。

You can't use the GoToPage action in the following cases:

  • 非表示のフォームのページにフォーカスを移動する場合

  • タブ コントロール内の別のページにフォーカスを移動する場合

To run the GoToPage action in a Visual Basic for Applications (VBA) module, use the GoToPage method of the DoCmd object.