You could make a table called tblQueryName, and run a report based on that after running this code to fill it:
Code:
Dim db As Database, qDef As QueryDef
Dim rs as Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("tblQueryName")
For Each qDef In db.QueryDefs
rs.AddNew
rs!QueryName = qDef.Name
rs.Update
Next qDef
That should give you a list of all queries in a table.
You could make a table called tblQueryName, and run a report based on that after running this code to fill it:
Code:
Dim db As Database, qDef As QueryDef
Dim rs as Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("tblQueryName")
For Each qDef In db.QueryDefs
rs.AddNew
rs!QueryName = qDef.Name
rs.Update
Next qDef
That should give you a list of all queries in a table.
You don't need to create a table to get this. Just use this query:
Code:
SELECT Count(MSysObjects.Name) AS CountOfName
FROM MSysObjects
GROUP BY MSysObjects.Type, Left([Name],1)
HAVING (((MSysObjects.Type)=5) AND ((Left([Name],1))<>"~"));
But you don't own them even if you own the database. They are always locked for writing from queries and such.
I once wrote a cross-referencer that queried the SYS tables. Still have the code somewhere. The real bear was parsing the VBA to find references from that sucker.