How to Get a List of Fields

C

Chaplain Doug

How do I produce a nice printable list of the fields in a
table? I just want the field names and maybe definitions
(field type and length). Thanks for the help.

Chaplain Doug
 
J

Jeff Conrad

Hi,

You can always go to Tools-->Analyze-->Documenter and get tons of
information, but I prefer a different method. I use MVP John Viescas's nice
utility in his sample download files.

On one nice slick report it prints exactly what you're after in a very easy
to read format.

Go here:
http://www.viescas.com/Info/links.htm

Download one of the sample files near the bottom.
I'm not sure if the utility is in every download or not.
Try the wedding one to be sure.

1. Import the following things to your database:
Table: zTableFields
Report: zTableFields
Module: zmodDumpTbl

2. Compile your database immediately.

3. Delete all the records in that table.

4. Open the module in Design View and then go to the Immediate Window (CTRL
G). Type DumpTables and hit Enter. The table will now be populated with all
your field properties from all tables!

5. Now just open the report! Poof! Instant slick report! Very nice.

Anytime you make changes to any fields and want to see an updated report
just delete all the records in the table and run the module code again. I
took it one step further and made a command button on a form to open the
report. The code first deletes all the records in the zTableFields, then
runs the module code, then opens up the report. Way cool. I use this in all
my databases now.

Hope that helps,
Jeff Conrad
Bend, Oregon
 

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

Top