You are on page 1of 7

To refer to a Container object in a collection by its ordinal number or by its Name property setting, use any of the

following syntax forms:


Containers (0)
Containers ("name")
Containers ![name]

Example
This example enumerates the Containers collection of the Northwind database and the Proper ties collection of
each Container object in the collection.

Sub ContainerObjectX()

Dim dbsNorthwind As Database


Dim ctrLoop As Container
Dim prpLoop As Property

Set dbsNorthwind = OpenDatabase("Northwind.mdb")

With dbsNorthwind

' Enumerate Containers collection.


For Each ctrLoop In .Containers
Debug.Print "Properties of " & ctrLoop.Name _
& " container"

' Enumerate Properties collection of each


' Container object.
For Each prpLoop In ctrLoop.Properties
Debug.Print " " & prpLoop.Name _
& " = " prpLoop
Next prpLoop

Next ctrLoop

.Close
End With

End Sub
Container members (DAO)
1/17/2019 • 2 minutes to read • Edit Online

Applies to : Access 2013, Office 2013


A Container object groups similar types of Document objects together.

Properties
NAME DESC RIP T IO N

Documents Returns a Documents collection that contains all of the


documents stored in the specified object. Read-only.

Name Returns the name of the specified object. Read-only


String .

Proper ties Returns the Proper ties collection of the specified object.
Read-only.
Container properties (DAO)
1/17/2019 • 2 minutes to read • Edit Online

Applies to : Access 2013, Office 2013


Container.Documents property (DAO)
Container.Name property (DAO)
Container.Properties property (DAO)
Container.Documents property (DAO)
1/17/2019 • 2 minutes to read • Edit Online

Applies to : Access 2013, Office 2013


Returns a Documents collection that contains all of the documents stored in the specified object. Read-only.

Syntax
expression .Documents
expression A variable that represents a Container object.
Container.Name property (DAO)
1/17/2019 • 2 minutes to read • Edit Online

Applies to : Access 2013, Office 2013


Returns the name of the specified object. Read-only String .

Syntax
expression .Name
expression A variable that represents a Container object.
Container.Properties property (DAO)
1/17/2019 • 2 minutes to read • Edit Online

Applies to : Access 2013, Office 2013


Returns the Proper ties collection of the specified object. Read-only.

Syntax
expression .Properties
expression A variable that represents a Container object.
Containers object reference (DAO)
1/17/2019 • 2 minutes to read • Edit Online

Applies to : Access 2013, Office 2013


Containers collection (DAO)
Containers members (DAO)
Containers properties (DAO)
Containers methods (DAO)

You might also like