Printing Lists of Queries

  • Thread starter Thread starter Emily Loomer
  • Start date Start date
E

Emily Loomer

I have hundreds of queries for my Access Database. I'm
leaving my post and need to find a way to print a list of
the queries without pasting dozens of screens into word.
Is there ANY way at all to do this?
 
Hi,

You can get this info from the system tables with the following query:

SELECT DISTINCT MSysObjects.Name,
IIf([Flags]=0,"Select",IIf([Flags]=16,"Crosstab",IIf([Flags]=32,"Delete",IIf
([Flags]=48,"Update",IIf([flags]=64,"Append","Make Table"))))) AS Type
FROM MSysObjects INNER JOIN MSysQueries ON MSysObjects.Id =
MSysQueries.ObjectId;

That query will also show you the type of each query .. if you just want the
names then use:

SELECT DISTINCT MSysObjects.Name
FROM MSysObjects INNER JOIN MSysQueries ON MSysObjects.Id =
MSysQueries.ObjectId;

which will give you just the names.

HTH


MFK.
 
Do you want the SQL Text of the queries or just the names of the queries? I
suspect the former.

One method would be to use the documenter in the tools menu. You can select
just the queries you want and limit the output to just the SQL statement and the
name of the query by using the options button and unchecking everything but the
SQL option. Also watch the settings for the fields.

I would recommend selecting only one query and seeing what you get as output
with the various options checked/unchecked. Once you find the "right"
combination, select all the queries and run the documenter.

That is the simplest way to get a printout.
 
Back
Top