How Can I print a Listing of Just My Query Names

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a very small database of all the coaches in my Region. At times they
have asked me for reports that just involved a small Query.

The problem is that I would like to show the Regional Director a listing of
all the Query Names. I do not need the Names, Sizes, Properties, Etc that
the Documenter wants to give me.

It wants to give me a page for each name and that will end up being over
5,500 pages.

Does anyone know how I can print just the names. Print them in a Label
Format would be nice as I limit my Query Names to 15 Characters Max.

Any assistance on this matter would be appreciated!

Thanks in Advance!

Len
 
Try

Set rst = db.OpenRecordset("Select MSysObjects.Name From MSysObjects
Where MSysObjects.Type=5 And InStr([Region19],'~')=False")

Make sure that the record source is in one line

--
Good Luck
BS"D


Len said:
Ofer;
Thought I would show the code I have so far!

Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim CmdExec As String

Set db = CurrentDb

Set rst = db.OpenRecordset("Select MSysObjects.Name From MSysObjects
Where (((MSysObjects.Type)=5) And (InStr([Region19],""~"")=False);")

Where .Name is Should that be my Database Name? also on the InStr, should
that be Name or the name of my database! It keeps telling me it wants mor
brackets, but I do not know why or where.

Thanks Again

Len

Ofer Cohen said:
Try this SQL using the MSysObjects table

SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Type)=5) AND ((InStr([Name],"~"))=False));

--
Good Luck
BS"D


Len said:
I have a very small database of all the coaches in my Region. At times they
have asked me for reports that just involved a small Query.

The problem is that I would like to show the Regional Director a listing of
all the Query Names. I do not need the Names, Sizes, Properties, Etc that
the Documenter wants to give me.

It wants to give me a page for each name and that will end up being over
5,500 pages.

Does anyone know how I can print just the names. Print them in a Label
Format would be nice as I limit my Query Names to 15 Characters Max.

Any assistance on this matter would be appreciated!

Thanks in Advance!

Len
 
Ofer;
Thought I would show the code I have so far!

Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim CmdExec As String

Set db = CurrentDb

Set rst = db.OpenRecordset("Select MSysObjects.Name From MSysObjects
Where (((MSysObjects.Type)=5) And (InStr([Region19],""~"")=False);")

Where .Name is Should that be my Database Name? also on the InStr, should
that be Name or the name of my database! It keeps telling me it wants mor
brackets, but I do not know why or where.

Thanks Again

Len

Ofer Cohen said:
Try this SQL using the MSysObjects table

SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Type)=5) AND ((InStr([Name],"~"))=False));

--
Good Luck
BS"D


Len said:
I have a very small database of all the coaches in my Region. At times they
have asked me for reports that just involved a small Query.

The problem is that I would like to show the Regional Director a listing of
all the Query Names. I do not need the Names, Sizes, Properties, Etc that
the Documenter wants to give me.

It wants to give me a page for each name and that will end up being over
5,500 pages.

Does anyone know how I can print just the names. Print them in a Label
Format would be nice as I limit my Query Names to 15 Characters Max.

Any assistance on this matter would be appreciated!

Thanks in Advance!

Len
 
Try this SQL using the MSysObjects table

SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Type)=5) AND ((InStr([Name],"~"))=False));
 
Mr. Cohen;

Thanks for getting back to me. I am having problems with the Syntax of the
SQL instruction below. I am getting errors like "Need Case" and with the
tilde.

The Name of My Database is Region19.mdb.

I guess I need to know what to define?

I tried:
Dim db as DAO.Database

Set db = CurrentDB

I tried putting the code you sent me into a string and executing
it, no go!

In all honesty I am not real familiar with SQL unless I am in Tables.

Thanks Again!




Ofer Cohen said:
Try this SQL using the MSysObjects table

SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Type)=5) AND ((InStr([Name],"~"))=False));

--
Good Luck
BS"D


Len said:
I have a very small database of all the coaches in my Region. At times they
have asked me for reports that just involved a small Query.

The problem is that I would like to show the Regional Director a listing of
all the Query Names. I do not need the Names, Sizes, Properties, Etc that
the Documenter wants to give me.

It wants to give me a page for each name and that will end up being over
5,500 pages.

Does anyone know how I can print just the names. Print them in a Label
Format would be nice as I limit my Query Names to 15 Characters Max.

Any assistance on this matter would be appreciated!

Thanks in Advance!

Len
 
I reworked the SQL a bit. Create a new query, and paste this SQL into
the SQL view.

SELECT MSysObjects.Name
FROM MSysObjects
WHERE (MSysObjects.Type=5) AND (InStr([Name],"~")=False);

Then you can create a report that pulls from your query and prints the
labels.

HTH,
Chris M.
 
Back
Top