DAO Object
 
Returns the name of the Container object to which a Document object belongs (Microsoft Access workspaces only). .
 

Syntax

expression .Container
expression A variable that represents a Document object.
 

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