Access 2003 - Setting SummaryInfo properties

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top