Retrieving Field Descriptions 
Author Message
 Retrieving Field Descriptions

Hello,
I'm sure there is an easy answer to this, but I can't sem to crack it!

I'm trying to pull information from table defs so that I can document the
tables in my database (the built-in table Documenter does not do the job I
want).  I have managed to get the field name, datatype and size, but cannot
seem to grasp how to retrieve the field descriptions.  It would seem these
are not part of Jet, but belong to Access.

Can anyone help?
Many thanks
Steve



Fri, 19 Sep 2003 17:02:11 GMT  
 Retrieving Field Descriptions
Steve

Some dirty code (in A97) that you can use to retrieve Field Description

***Code starts***
Public Sub subFieldDescription(strTable As String)

Dim db As Database
Dim tdTable As TableDef
Dim fldField As Field

Set db = CurrentDb()
Set tdTable = db.TableDefs(strTable)
For Each fldField In tdTable.Fields
    On Error Resume Next
    Debug.Print fldField.Properties("Description")
Next

End Sub
***Code ends***

HTH
Van T. Dinh


Quote:
> Hello,
> I'm sure there is an easy answer to this, but I can't sem to crack it!

> I'm trying to pull information from table defs so that I can document the
> tables in my database (the built-in table Documenter does not do the job I
> want).  I have managed to get the field name, datatype and size, but
cannot
> seem to grasp how to retrieve the field descriptions.  It would seem these
> are not part of Jet, but belong to Access.

> Can anyone help?
> Many thanks
> Steve



Fri, 19 Sep 2003 20:39:27 GMT  
 Retrieving Field Descriptions
Hmmmm... I tried this previously and couldn't get it to work, but copying
your code has done the trick.  I guess I must have had some kind of syntax
error.

Many thanks for your help.
Steve



Quote:
> Steve

> Some dirty code (in A97) that you can use to retrieve Field Description

> ***Code starts***
> Public Sub subFieldDescription(strTable As String)

> Dim db As Database
> Dim tdTable As TableDef
> Dim fldField As Field

> Set db = CurrentDb()
> Set tdTable = db.TableDefs(strTable)
> For Each fldField In tdTable.Fields
>     On Error Resume Next
>     Debug.Print fldField.Properties("Description")
> Next

> End Sub
> ***Code ends***

> HTH
> Van T. Dinh



> > Hello,
> > I'm sure there is an easy answer to this, but I can't sem to crack it!

> > I'm trying to pull information from table defs so that I can document
the
> > tables in my database (the built-in table Documenter does not do the job
I
> > want).  I have managed to get the field name, datatype and size, but
> cannot
> > seem to grasp how to retrieve the field descriptions.  It would seem
these
> > are not part of Jet, but belong to Access.

> > Can anyone help?
> > Many thanks
> > Steve



Sat, 20 Sep 2003 16:14:16 GMT  
 Retrieving Field Descriptions

Quote:
>the built-in table Documenter does not do the job I want.

I had the same problem - you can use Simple Table Documentor at
www.ssw.com.au
FREEWARE

Adam


Quote:
> Hello,
> I'm sure there is an easy answer to this, but I can't sem to crack it!

> I'm trying to pull information from table defs so that I can document the
> tables in my database (the built-in table Documenter does not do the job I
> want).  I have managed to get the field name, datatype and size, but
cannot
> seem to grasp how to retrieve the field descriptions.  It would seem these
> are not part of Jet, but belong to Access.

> Can anyone help?
> Many thanks
> Steve



Fri, 31 Oct 2003 08:25:13 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Retrieving Field descriptions from Access table using ADO

2. Retrieving Field descriptions from Access table using ADO

3. How to retrieve Field Description from SQL Server with ADO?

4. SQL Server Field Descriptions and Microsoft Access Field Descriptions

5. Retrieve the description of a field in a Access DB

6. Q: Best way to retrieve Access field description from a query

7. Table Description/Field Description

8. Fields property for field description?

9. Retrieving Table Descriptions with DAO

10. Retrieve Access 97 Table Description

11. Retrieving description from properties and methods

12. retrieve description property from database

 

 
Powered by phpBB® Forum Software