The OpenDataAccessPage method carries out the OpenDataAccessPage action in Visual Basic. For more information on how the action and its arguments work, see the action topic.
Syntax
DoCmd.OpenDataAccessPage datapagename [, datapageview]
The OpenDataAccessPage method has the following arguments.
| Argument | Description | 
|---|---|
| datapagename | A string expression that's the valid name of a data access page in the current database. | 
| If you execute Visual Basic code containing the OpenDataAccessPage method in a library database, Microsoft Access looks for the form with this name first in the library database, then in the current database. | |
| datapageview | One of the following intrinsic constants: | 
| acDataPageBrowse (default) acDataPageDesign  | 
|
| acDataPageBrowse opens the form in Page view. | |
| If you leave this argument blank, the default constant (acDataPageBrowse) is assumed. | 
Remarks
If the connection password was not contained in the connection information for the data access page when it was created, the user is prompted to provide a password when the OpenDataAccessPage method is used.