OpenView Method

OpenView Method

         Example         Applies To

The OpenView method carries out the OpenView action in Visual Basic. For more information on how the action and its arguments work, see the action topic.

Syntax

DoCmd.OpenView viewname [, viewmode] [, datamode]

The OpenView method has the following arguments.

Argument Description
viewname A string expression that's the valid name of a view in the current database.
  If you execute Visual Basic code containing the OpenView method in a library database, Microsoft Access looks for the view with this name first in the library database, then in the current database.
viewmode One of the following intrinsic constants:
  acViewNormal (default)
acViewDesign
acPreview
  If you leave this argument blank, the default constant (acViewNormal) is assumed.
datamode One of the following intrinsic constants.
  acEdit (default)
acAdd
acReadOnly
  If you leave this argument blank, the default constant (acEdit) is assumed.