OpenDataAccessPage Method

Microsoft Access Visual Basic

OpenDataAccessPage Method

       

The OpenDataAccessPage method carries out the OpenDataAccessPage action in Visual Basic.

expression.OpenDataAccessPage(DataAccessPageName, View)

expression   Required. An expression that returns one of the objects in the Applies To list.

DataAccessPageName  Required Variant. 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.

View  Optional AcDataAccessPageView. The view in which to open the data access page.

AcDataAccessPageView can be one of these AcDataAccessPageView constants.
acDataAccessPageBrowse default  Opens the form in Page view.
acDataAccessPageDesign  Opens the form in Design view.

Remarks

For more information on how the action and its arguments work, see the action topic.

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.

Example

The following example opens the Employees data access page in Design view.

DoCmd.OpenDataAccessPage "Employees", acDataAccessPageDesign