Freigeben über


Document.Container-Eigenschaft (DAO)

Gilt für: Access 2013, Office 2013

Gibt den Namen des Container-Objekts zurück, zu dem ein Document-Objekt gehört (nur Microsoft Access-Arbeitsbereiche). .

Syntax

Ausdruck . Container

Ausdruck Eine Variable, die ein Document-Objekt darstellt.

Beispiel

Dieses Beispiel zeigt die Container-Eigenschaft für verschiedene Document-Objekte an.

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