[AccessD] Operation Not Supported...

Arthur Fuller fuller.artful at gmail.com
Sun Oct 16 06:02:11 CDT 2022

I'm a little puzzled by this error, especially since I copied the sub from
Microsoft Learn.

Sub DatabaseObjectX()

 Dim wrkAcc As Workspace
 Dim dbsNorthwind As Database
 Dim dbsNew As Database
 Dim dbsLoop As Database
 Dim prpLoop As Property

 Set wrkAcc = CreateWorkspace("AccessWorkspace", "admin", _
    "", dbUseJet)

 ' Make sure there isn't already a file with the name of
 ' the new database.
 If Dir("NewDB.accdb") <> "" Then Kill "NewDB.accdb"

 ' Create a new database with the specified
 ' collating order.
 Set dbsNew = wrkAcc.CreateDatabase("NewDB.accdb", _
 Set dbsNorthwind = wrkAcc.OpenDatabase(CON_NorthwindPath &

 ' Enumerate the Databases collection.
 For Each dbsLoop In wrkAcc.Databases
    With dbsLoop
        Debug.Print "Properties of " & .Name
        ' Enumerate the Properties collection of each
        ' Database object.
        For Each prpLoop In .Properties
           ' the line below causes the error
            If prpLoop <> "" Then Debug.Print " " & _
                prpLoop.Name & " = " & prpLoop
        Next prpLoop
    End With
 Next dbsLoop


End Sub
The error message says "Operation not supported for this type of object."

Any idea why?


More information about the AccessD mailing list