Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Object Listing in MS Access 2000

Discussion in 'Information Technology' started by Richard John, Jul 28, 2006.

  1. Richard John

    Richard John
    Expand Collapse
    Guest

    Does anyone know how to extract the Description property of the Objects in
    each MS Access container ie. Tables, Queries etc... I've inserted
    descriptions against 80% of the objects in a few databases (sort of
    on-the-fly documentation). I can list out the names of the objects, no
    sweat. However, I can't list the descriptions. I need all this for
    documentation purposes.

    Thanks
    --

    Richard John
    rjbpond@bigpond.net.au
     
  2. Loading...


  3. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    You need to open the object in design view, then refer to its Description
    property. Unfortunately, the Description property doesn't exist unless you
    add a description: if you try and refer to the property and there is no
    description, an error is raised.

    For tables and queries, there's no need to use the Container, though: simply
    use the TableDefs and QueryDefs collections.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Richard John" <rjbpond@bigpond.net.au> wrote in message
    news:uVU1aEAiGHA.1520@TK2MSFTNGP03.phx.gbl...
    > Does anyone know how to extract the Description property of the Objects in
    > each MS Access container ie. Tables, Queries etc... I've inserted
    > descriptions against 80% of the objects in a few databases (sort of
    > on-the-fly documentation). I can list out the names of the objects, no
    > sweat. However, I can't list the descriptions. I need all this for
    > documentation purposes.
    >
    > Thanks
    > --
    >
    > Richard John
    > rjbpond@bigpond.net.au
    >
    >
     
  4. Richard John

    Richard John
    Expand Collapse
    Guest

    Thanks very much, Douglas. Appreciate your helpful response. I really should
    have looked deeper. I found this example in MS Access Help, which solves the
    problem (code fragment slightly modifed to suit):

    #########################################
    Set dbs = CurrentDb
    ' Set Container object variable.
    Set ctr = dbs.Containers(strObjectType)
    ' Set Document object variable.
    Set doc = ctr.documents(strObjectName)

    ' Print each Object property to Debug window.
    For Each prp In doc.Properties
    Select Case prp.Name 'I adapted this part of the example. Just
    wanted three properties
    Case Is = "Name", "Container", "Description"
    Debug.Print prp.Name & " = " & prp.Value
    End Select
    Next

    #########################################

    Thanks
    --
    Richard John
    rjbpond@bigpond.net.au



    "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    news:uutOEkAiGHA.4896@TK2MSFTNGP05.phx.gbl...
    > You need to open the object in design view, then refer to its Description
    > property. Unfortunately, the Description property doesn't exist unless you
    > add a description: if you try and refer to the property and there is no
    > description, an error is raised.
    >
    > For tables and queries, there's no need to use the Container, though:
    > simply use the TableDefs and QueryDefs collections.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "Richard John" <rjbpond@bigpond.net.au> wrote in message
    > news:uVU1aEAiGHA.1520@TK2MSFTNGP03.phx.gbl...
    >> Does anyone know how to extract the Description property of the Objects
    >> in each MS Access container ie. Tables, Queries etc... I've inserted
    >> descriptions against 80% of the objects in a few databases (sort of
    >> on-the-fly documentation). I can list out the names of the objects, no
    >> sweat. However, I can't list the descriptions. I need all this for
    >> documentation purposes.
     

Share This Page