Inherit Property Example

This example sets the Tables container's Inherit property to True so that any subsequently created Document objects in the Tables container will have the same security settings as the Tables container.

Sub InheritX()

    Dim dbsNorthwind As Database
    Dim conTables As Container

    Set dbsNorthwind = OpenDatabase("Northwind.mdb")
    Set conTables = dbsNorthwind.Containers("Tables")

    ' By setting the Inherit property of the Tables container 
    ' to true and setting its permissions, any new Document 
    ' object in this container will inherit the same 
    ' permissions setting.
    conTables.Inherit = True
    conTables.Permissions = dbSecWriteSec

    dbsNorthwind.Close

End Sub