AllowDatasheetView Property

Microsoft Access Visual Basic

expression.AllowDatasheetView

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

Remarks

Use the AllowDatasheetView, AllowFormView , AllowPivotChartView , or AllowPivotTableView properties to control which views are allowed for a form.

Example

The following example makes Datasheet View valid for the specified form and then opens the form in Datasheet View.

Forms(0).AllowDatasheetView = True
DoCmd.OpenForm FormName:=Forms(0).Name, View:=acFormDS