Views Property (ContainerRenderer Object)

The Views property returns a single CalendarView or TableView object or a Views collection object containing all the views on a container object. Read-only.

Syntax

Set objViewsColl = objContRend.Views

Set objView = objContRend.Views(index)

objViewsColl
Object. The Views collection of this container renderer.
objContRend
Required. The ContainerRenderer object.
objView
Object. An individual CalendarView or TableView object belonging to this container renderer's Views collection.
index
Integer. An index into the container renderer's Views collection.

Data Type

Object (TableView or Views collection)

Remarks

The Views collection returned by the Views property contains all the predefined common, folder, and personal views on the container object. If you have modified any of these predefined views, your changes are still in effect provided the Views collection has not been released in the meantime. Custom views you have added to the collection are also in effect until the collection is released. Setting the DataSource property releases the collection, but setting the CurrentView property does not.

To select the view to be used to render the container object, set the CurrentView property to one of the views returned in the Views property.

If a view object is to be accessed with the index parameter, the value of index must be between 1 and the size of the container renderer's Views collection. This size is available in the collection's Count property.

Although the Views property itself is read-only, the collection it returns can be accessed in the normal manner through its Add method, and the properties on its member CalendarView and TableView objects retain their respective read/write or read-only accessibility.