CurrentView Property

CurrentView Property

See Also         Example         Applies To

You can use the CurrentView property to determine how a form or data access page is currently displayed. For example, you might need to know whether a form is in Form view or Datasheet view before you attempt to place controls on the form by using Visual Basic.

Settings

The CurrentView property uses the following settings.

Setting Form Displayed In: Data Access Page Displayed In:
0 Design view class="pop">Design view
1 Form view Page view
2 Datasheet view Not applicable

This property is available only by using a macro or Visual Basic and is read-only in all views.

Remarks

You can also use this property to perform different tasks depending on the current view. For example, an event procedure could determine which view the form is displayed in and perform one task if the form is displayed in Form view or another task if it's displayed in Datasheet view.