Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to show list of queries in current db

Status
Not open for further replies.

netsmurph

Technical User
Mar 19, 2003
63
GB
I am trying to find the sql table to query to find the list of queries in an access database.

I have looked at MSySobjects table, but cannot find what identifies they actual queries from other objects.

Thanks in advance

Andrew
 
the end column should be type, if this equals to 5 then these are the queries within the present database

Code:
SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Type)=5))
ORDER BY MSysObjects.Name;

1 = table
4 = linked tables

I hope this helps
 
Great information.... Always wanted to be able to search my created Queries.. tables etc...

I believe the 4 = linked tables should be a 6 (is in mine anyway, Access 2000).

Is there a way to do this to show what Reports have been created also?

Thanks,
John
 
1 Table
2 Database
3 Collection
4, 6 Linked Table
5 Query
8 Relationship
-32768 Form
-32766 Macro
-32764 Report
-32761 Module

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top