Print all the tables

G

Guy Cohen

Hi all.
Is it possible to print ALL the tables and their columns + description with
only a couple of clicks (Instead of opening each and clicking print).
TIA
Guy
 
A

Allen Browne

The Documenter might do what you want:
Tools | Analyze | Documenter

If you want to do it programmatically, you could OpenRecordset on this
query:
SELECT MsysObjects.Name FROM MsysObjects
WHERE (([Type] = 1) AND ([Name] Not Like "~*") AND ([Name] Not Like
"MSys*"))
ORDER BY MsysObjects.Name;

That gives you all the table names, so you can then use the TableDef and
Fields and Properties to print details from there. Example code at:
http://members.iinet.net.au/~allenbrowne/func-06.html

If you want to include the linked tables and ODBC linked tables, replace:
[Type] = 1
with:
[Type] IN (1,4,6)
in the query.
 
J

Jeff Conrad

Guy Cohen said:
Hi all.
Is it possible to print ALL the tables and their columns + description with
only a couple of clicks (Instead of opening each and clicking print).

Would you settle for three clicks? :)

I created an Access Add-In called the "John Viescas Table Documentor" that does exactly this. It is
even easier to use than the built-in Access Documentor and creates a slick report right in your
database that you can just open again any time right from the Database Window. It will list each
table and its field properties in an easy-to-read format.You could customize the report even more to
your liking if you desire.

Once installed all you have to do is Tools | Add-Ins | John Viescas Table Documentor (3 clicks).
Poof! After a
few seconds a slick report is displayed on the screen. In a nut shell the Add-In creates a new key
table in your database, loops through each table (including linked ones) grabbing the information
needed, writes all this information to the key table, creates the report entirely in code, saves it,
and then displays it on the screen for you. That report can be opened again at any time since it is
saved as a new report object in your database. Easy as pie!

I am awaiting word back from John about the possibility of having him post it on his web site where
anyone can download it. In the meantime I do not believe he would have a problem if I sent you a
copy. If you do wish to have a copy please let me know where you would like it sent to (please mung
the e-mail address so you won't get spammed). There is one version for Access 97 and one for 2000
which works with 2000, 2002, and 2003.
 
Top