Creating User Defined Document in an Access Database


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Creating User Defined Document in an Access Database

  1. #1
    Dave Keighan Guest

    Creating User Defined Document in an Access Database

    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



  2. #2
    Dave Keighan Guest

    Re: Creating User Defined Document in an Access Database

    Greetings

    FWIW and FYI I have found an *answer* ... haven't tried it yet but it looks
    promising.

    http://support.microsoft.com/support.../Q178/7/45.ASP

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



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center