Create a list of the fields in an Access table
When viewing a table that has many fields in Design view, you haveto scroll up and down to review the field names. This can be tiresome when you're referring to them constantly, and particularly when you're working with several tables.
The following code produces a field listing for a given table.
This can then be copied to Notepad and printed for easy reference.
Enter the code into a module, substituting your table's name whereappropriate. Then, open the Debug window, type ListFields, andpress [Enter] to produce the listing.
Dim dbs As DATABASE
Dim dbfield As Field
Dim tdf As TableDef
Set dbs = CurrentDb
Set tdf = dbs.TableDefs!NAMEOFYOURTABLEHERE
Debug.Print "Name of table: "; tdf.Name
For Each dbfield In tdf.Fields
This tip was contributed by Martin Dean.
Created Date: 12/07/2001 Last Reviewed: 12/07/2001 Rev. Date:
This site was last updated 06/11/06