Dear T Kelly:
Don't forget that a query can also be accessed from code or from
another query. When it is accessed in code, it is possible that the
name of the query could be placed in a variable then used in the code
to open it. It could also be assigned to the RecordSource of a form
or report, or to the ControlSource of a Combo or List Box. Such cases
may need to be searched for in code and studied.
An alternative is to remove queries you think are not being used, then
run the application and find what is broken. I'd agree this is not
the most effective, but it is probably a good idea to do this when you
have removed some queries.
To make this easy, I have sometimes just renamed a query I thought was
unnecessary, preceding the name with "obs" for obsolete, then
performing the testing. If I find I do need a query, I can most
quickly rename it back and see that the application works again.
The utility I recommend is made by FMV (
www.fmsinc.com). I don't
expect it will find all cases where the string variable containing the
name of a query is built in code, but it is quite good.
I was just given a database that has 250+ queries in it.
How can I find out quickly which queries are not the
datasource of any form or report so that I may delete
them?
Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts