[AccessD] Need to Find Access Report that is using a Specific Query

Bill Benson bensonforums at gmail.com
Sat Feb 6 15:12:55 CST 2016


Dan,

Your code and mine are not compatible.

My code was illustrating that the query name was totally irrelevant because
I was building the recordsource for the report on the fly, and there is
nothing F & R was going to find because looking in the record source for
the report, there would not be the name of the query ultimately used, one
would have to read the VBA very closely to know that the report relied on
the query (and only relied on it when the Open event was triggered in
fact). And depending on how the VBA dynamically compounded text to form the
string argument that resolved to the name of the queryDef you wanted to use
as a starting point for the recordsource for the report,  F & R might not
find it at all. A dumbass case where this were so is
   Querydefs (replacestr ("q u e r y n a m e", chr (32), "")).SQL

You might make the argument then that the report does not really "depend"
on queryname.  But it doesn't change the fact that my note was one of
caution.


More information about the AccessD mailing list