Container Property Example

This example displays the Container property for a variety of Document objects.

Sub ContainerPropertyX()

   Dim dbsNorthwind As Database
   Dim ctrLoop As Container

   Set dbsNorthwind = OpenDatabase("Northwind.mdb")

   ' Display the container name for the first Document 
   ' object in each Container object's Documents collection.
   For Each ctrLoop In dbsNorthwind.Containers
      Debug.Print "Document: " & ctrLoop.Documents(0).Name
      Debug.Print "  Container = " & _
         ctrLoop.Documents(0).Container
   Next ctrLoop

   dbsNorthwind.Close

End Sub