Form.DefaultView property (Access)
You can use the DefaultView property to specify the opening view of a form. Read/write Byte.
expression A variable that represents a Form object.
The DefaultView property uses the following settings.
|Single Form||0||(Default) Displays one record at a time.|
|Continuous Forms||1||Displays multiple records (as many as will fit in the current window), each in its own copy of the form's detail section.|
|Datasheet||2||Displays the form fields arranged in rows and columns like a spreadsheet.|
|PivotTable||3||Displays the form as a PivotTable.|
|PivotChart||4||Displays the form as a PivotChart.|
|Split Form||5||Displays a split view of a Single Form and a datasheet containing the form's records.|
The views displayed in the View button list depend on the setting of the ViewsAllowed property. For example, if the ViewsAllowed property is set to Datasheet, Form view is disabled in the View button list and on the View menu.
The combination of these properties creates the following conditions.
|Single, Continuous Forms, or Datasheet||Both||Users can switch between Form view and Datasheet view.|
|Single or Continuous Forms||Form||Users can't switch from Form view to Datasheet view.|
|Single or Continuous Forms||Datasheet||Users can switch from Form view to Datasheet view but not back again.|
|Datasheet||Form||Users can switch from Datasheet view to Form view but not back again.|
|Datasheet||Datasheet||Users can't switch from Datasheet view to Form view.|
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.