On Wed, 3 Feb 2010 09:11:01 -0800, DawnTreader
<(E-Mail Removed)> wrote:
>i am wondering if anyone can point me in the direction of what code i would
>need to do the same for forms and reports. what i need to know is how to find
>the "querydefs" for forms and reports. is there somewhere that stores that
>kind of information for a form and a report?
This is far from trivial. I use Total Access Analyzer form
http://www.fmsinc.com for the purpose, and I find it well worth the money.
The problem is that there are so MANY places to look. The Form or Report has a
Recordsource, which might be a tablename - or might be a multitable query,
which may well be based on some *other* query, which may...
They'll also have Filter and OrderBy properties which may well reference
fields... but that reference may well be immaterial if the FilterOn and
OrderByOn properties are False.
A form is also very likely to have one or more Subforms, which have all the
same issues.
A Form (or even a Report) may have one or more Combo Boxes or Listboxes, with
their own Rowsources - which again are likely to be Queries, possibly
multitable queries.
That doesn't even touch the fact that a form or report very likely will
contain VBA code, which could contain ANYTHING.
I wouldn't even venture to try to tackle this job! If you're really top-notch
at VBA and are intimately familiar with the Access object model... go for
it... but bear in mind that the good folks at FMS are both, and AFAIK they are
still testing the 2007 version.
--
John W. Vinson [MVP]