You can use the OpenDataAccessPage action to open a data access page in Page view or Design view.
The OpenDataAccessPage action has the following arguments.
Action argument | Description |
---|---|
Data Access Page Name | The name of the page to open. The Data Access Page Name box in the Action Arguments section of the Macro window shows all
pages in the current database. This is a required argument. If you run a macro containing the OpenDataAccessPage action in a library database, Microsoft Access looks for the page with this name first in the library database, then in the current database. |
View | The view in which the data access page will open. Click Browse or Design in the View box. The default is Browse. |
This action is similar to clicking the Open button or Design button after
clicking Pages
under
Objects,
and then selecting a data access page in the Database window.
Tip You can select a data access page in the Database window and drag it to a macro action row. This automatically creates an OpenDataAccessPage action that opens the data access page in Page view.
To run the OpenDataAccessPage action in Microsoft Visual Basic, use the OpenView method of the DoCmd object.