Reports Collection

Description

The Reports collection contains all of the currently open reports in a Microsoft Access database.

Remarks

You can use the Reports collection in Visual Basic or in an expression to refer to reports that are currently open. For example, you can enumerate the Reports collection to set or return the values of properties of individual reports in the collection.

Tip The For Each...Next statement is useful for enumerating a collection.

You can’t add or delete a Report object from the Reports collection.

You can refer to an individual Report object in the Reports collection either by referring to the report by name, or by referring to its index within the collection.

The Reports collection is indexed beginning with zero. If you refer to a report by its index, the first report is Reports(0), the second report is Reports(1), and so on.

Note To list all reports in the database, whether open or closed, enumerate the Documents collection of the Reports Container object. You can then use the Name property of each individual Document object to return the name of a report.

Properties

Count Property (Microsoft Access).

See Also

Application Object, Container Object, Document Object, Documents Collection, For Each...Next Statement, Report Object.

Example

See the Report object example.