Results 1 to 3 of 3

Thread: [RESOLVED] Programatically read a tables field description

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    66

    Resolved [RESOLVED] Programatically read a tables field description

    In MSAccess, is the a way to programatically read a table's field description?
    A quick search of the forum lead me to an unresolved post...so I am left in the dark.

    The unresolved post suggested the code (similar):

    Code:
    CurrentDb.TableDefs("SomeTable").Fields(0).Properties("Description").value
    But it does not work.

    Any suggestions?

  2. #2
    Hyperactive Member
    Join Date
    Jun 2006
    Location
    Best Place on Earth
    Posts
    363

    Re: Programatically read a tables field description

    If you open your table in design view you will be presented with three columns.

    Field Name, Data Type and Description.

    The code

    Code:
    Debug.Print CurrentDb.TableDefs("SomeTable").Fields(0).Properties("Description").value
    Will give give the Description field of the first field of SomeTable.
    If it gives nothing then that probably means that the Descritpion field for that
    Table field is blank.

    To test this put some text in the Description field and run the code again.
    Signature Under Construction

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    66

    Re: Programatically read a tables field description

    Thanks.

    The statement is bailing out because it is empy.

    If the description is empty, I expected an empty string or null to be returned by the statement....but it looks like does not.

    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width