Also Posted in "microsoft.public.vb.general.discussion"

I'm having problems creating and adding Properties to the "User Defined"
Document Object (located in the "Database" Container Object) in an Access
Database from VB6.

The "UsedDefined" Document does not *appear* to exist unless created by
Access. Somewhere in the VB documentation I recall reading that creating
this particular Document can't be done from VB. "Cannot create or delete
Containers or Documents in VB" - from Help(?) file. Why? Has any-one done it
or developed a work around?

If I add a "User Defined" property (Test=True) through Access (these are the
properties that show up in the fourth tab of the Properties Dialog) I can
find it using the following code:
' where dbData is an open database.
Dim mp As DAO.Property
Set mp =
dbData.Containers("Databases").Documents("UserDefined").Properties("Test")
MsgBox mp.Value

but using this code in VB fails to create the same property.
Dim mp as DAO.Property
Set mp =
dbData.Containers("Databases").Documents("UserDefined").CreateProperty("Test
", vbBoolean, True)
dbData.Containers("Databases").Documents("UserDefined").Properties.Append mp

I do know that the following Documents exist in the Databases Container of a
database opened with Access:
Documents in Databases container
"AccessLayout"
"MSysDb"
"SummaryInfo"
"UserDefined"
I can work with the properties of all of the Documents except "UserDefined"
.... it does not *appear* to exist in a database created with VB.

Any opinions or discussion would be appreciated.

--
Dave Keighan
Plan Your Work and Work Your Plan
Everybody Wins If You Post Your Replies to the NG



--
Dave Keighan
Plan Your Work and Work Your Plan
Everybody Wins If You Post Your Replies to the NG