The form is supposed to shift between form view and datasheet view. On the form is a CommandButton 'cmdDatasheetView' calling a VBA procedure in the forms code module.
Private Sub cmdDatasheetView_Click()
Const intcDatasheetView As Integer = 2
Me.CurrentView = intcDatasheetView
End Sub
Executing the sub return an error message: Run-time error '2135': This property is write protected and can't be specified.
According to online documentation CurrentView is read/write integer. Apparently there is no Form property setting a write protection.
Is it possible to set CurrentView using VBA? If so, how?