Copying or printing out your tables & queries "Names"

D

Dave

I would like to know if there is a way in which I could copy (or maybe get a print out) of a list of my tables &/or queries in a given database? When I say "copy" I don't mean the entire "Table or Query"' contents itself, I'm just trying to see if there's a way of copying the names/titles of my T/Q & then pasting them either onto Word, Notepad, etc for reference. Or at the vey least have a list print out. There's no "Select All" option in the "Tables & Queries" window & i was wondering if there is some trick to accomplish my objective

Thanks & feel free to email me directly
 
C

Cheryl Fischer

Try the Database Documenter, it has a number of options for selecting what
is to be reported. In newer versions of Access, it is available from the
menu: Tools|Analyze



--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Dave said:
I would like to know if there is a way in which I could copy (or maybe get
a print out) of a list of my tables &/or queries in a given database? When
I say "copy" I don't mean the entire "Table or Query"' contents itself, I'm
just trying to see if there's a way of copying the names/titles of my T/Q &
then pasting them either onto Word, Notepad, etc for reference. Or at the
vey least have a list print out. There's no "Select All" option in the
"Tables & Queries" window & i was wondering if there is some trick to
accomplish my objective?
 
E

Elwin

Paste the following sub procedure into a new module.
Place your cursor in the immediate window (bottom of the
visual basic editor). Type 'GetTableQueryNames' without
the quotes, and press enter.

Sub GetTableQueryNames()
Dim tdf as TableDef
Dim qdf as QueryDef
Debug.Print "TABLE NAMES:"
For Each tdf in CurrentDb.TableDefs
Debug.Print tdf.Name
Next tdf
Debug.Print "QUERY NAMES:"
For Each qdf in CurrentDb.QueryDefs
Debug.Print qdf.Name
Next qdf
MsgBox "Done. See immediate window (ctl+G) for results."
End Sub

-----Original Message-----
I would like to know if there is a way in which I could
copy (or maybe get a print out) of a list of my tables
&/or queries in a given database? When I say "copy" I
don't mean the entire "Table or Query"' contents itself,
I'm just trying to see if there's a way of copying the
names/titles of my T/Q & then pasting them either onto
Word, Notepad, etc for reference. Or at the vey least
have a list print out. There's no "Select All" option in
the "Tables & Queries" window & i was wondering if there
is some trick to accomplish my objective?
 
D

Douglas J. Steele

What do you mean by "it didn't do the job"? Do you mean it didn't run for
you: that an error was raised, presumably "User-type not defined"? That
would be because that code uses DAO, and both Access 2000 and 2002 don't
have a reference set to DAO by default.

With any code module open, select Tools | References from the menu bar,
scroll through the list of available references until you find the one for
Microsoft DAO 3.6 Object Library, and select it.
 

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