Containers Collection (DAO)
Office 2013 and later
Last modified: June 30, 2011
Applies to: Access 2013 | Office 2013
A Containers collection contains all of the Container objects that are defined in a database.
This example enumerates the Containers collection of the Northwind database and the Properties 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
Show: