You can use the OpenDataAccessPage action to open a data access page in Page view or Design view.
Setting
The OpenDataAccessPage action has the following arguments.
Action argument | Description |
---|---|
Data Access Page Name | The name of the form to open. The Data Access Page Name box in the Action Arguments section of the Macro window shows all forms 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 form 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. |
Remarks
This action is similar to clicking the Open button or Design button in the Database window after selecting a data access page on the Pages tab.
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 Visual Basic, use the OpenView method of the DoCmd object.