M
Michael James
I have an Access 2003 database application that creates other Access
databases. As part of that process, I want to set the Database Summary Info
properties. After studying previous posts on the topic in this forum, I wrote
the following code.
Dim wrkDefault As Workspace
Dim dbNew As Database
Dim sName As String
sName = "C:\Test\Test.mdb"
Set wrkDefault = DBEngine.Workspaces(0)
Set dbNew = wrkDefault.CreateDatabase(sName, dbLangGeneral
dbNew.Containers!Databases.Documents("SummaryInfo").Properties("Title").Value = "TEST"
dbNew.Close
When I run the code above, it generates run-time error 3265, "Item not found
in this collection" on the line that attempts to set the SummaryInfo Title
property.
If I comment that line out, the database is created without a problem.
Running the same code in the immediate window (substituting Currentdb() for
dbNew) works properly.
Can anyone help me?
databases. As part of that process, I want to set the Database Summary Info
properties. After studying previous posts on the topic in this forum, I wrote
the following code.
Dim wrkDefault As Workspace
Dim dbNew As Database
Dim sName As String
sName = "C:\Test\Test.mdb"
Set wrkDefault = DBEngine.Workspaces(0)
Set dbNew = wrkDefault.CreateDatabase(sName, dbLangGeneral
dbNew.Containers!Databases.Documents("SummaryInfo").Properties("Title").Value = "TEST"
dbNew.Close
When I run the code above, it generates run-time error 3265, "Item not found
in this collection" on the line that attempts to set the SummaryInfo Title
property.
If I comment that line out, the database is created without a problem.
Running the same code in the immediate window (substituting Currentdb() for
dbNew) works properly.
Can anyone help me?