How to display Table Field names AND Field Definitions in a Report ? (ditto for query fields & crite

  • Thread starter Thread starter Will
  • Start date Start date
W

Will

1 - We want to create a Report that shows the Field Names and Field
Definitions of each table.

2 - Secondarily we also want to show Query Fields and associated 'Criteria'

We do not want to use the documenter feature.

We are trying to put a Button on our Main Menu so users can read the Field
Definitions directly from the various tables.

This may not be the best way to do it but we have to set that discussion
aside for now and just get it done.

Thanks for any help.
 
Will,

You cannot run a query to do this, you will need to loop through the
TableDefs and or QueryDefs collections to get this information (although I've
never tried to get the criteria from a querydef or the description from the
fields). To get the table field names and description, try something like:

Public Sub MyTest()

Dim tdf As DAO.TableDef
Dim fld As DAO.Field

For Each tdf In CurrentDb.TableDefs
Debug.Print tdf.Name
For Each fld In tdf.Fields
Debug.Print " ", fld.Name, fld.OrdinalPosition
Next
Next

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top