John Bartow
john at winhaven.net
Sat Sep 6 16:46:59 CDT 2003
I found the reference to it in the FMS newsgroups: My Question posted 10-26-2001 12:42 PM: --------------------------------------------------------------------- I am attempting to find unused forms and reports in my Access 97 application database. I am considering any form or report not called by some procedure (either form, macro or module) as not used. Since forms and reports aren't considered unused in the TAA's list of suggestions, I am using the XREF to indicate this. Initially the Xref did not show any xrefs for forms that were called using the coding method: Dim stDocName As String stDocName = "frmMyForm" DoCmd.OpenForm stDocName In order to verify this is correct I added another command button next to the original using the coding method: DoCmd.OpenForm "frmMyForm" It did not detect the Xref using the first but did the second. Since MS wizard generated command buttons which open forms use the first method I find this hard to believe so I am writing and checking to make sure I didn't miss something. Also I am wondering if TA Analyzer 9 will work with the first coding method and also if it works with ADPs. If it does work with ADPs does it perform table structure/relationship analysis on SQL Server DBs? Thanks, John R Bartow WinHaven Consulting LLC PO Box 130 Winneconne, WI 54986-0130 920-582-7574 john at winhaven.net --------------------------------------------------------------------- The reason this is not found as a referenced object is because the Object is named in a variable. Basically, Total Access Analyzer 2000 can reference the Object if it is named directly, but cannot reference the Object if it is named in a variable. For example: This cannot be found: Dim stDocName As String stDocName = "MyObject" DoCmd.OpenQuery stDocName, acNormal, acEdit Here we find that the variable "stDocName" is referenced, but not the Object assigned to that variable. To see that the variable "stDocName" is referenced, review the Module XRef Report named "DoCmd, Sorted By Action". This will show that the DoCmd function is calling the .OpenQuery command and then the parameters. Note the parameters are listed as "stDocName" (or what your variable name is) for some of them. But this can be found: DoCmd.OpenQuery "MyObject", acNormal, acEdit There is an area in the manual that explains the documentation limitations more thoroughly. This is on pages 24-26 of the 8.0 manual. There are other XRef Reports you can see that name the Variables referenced. For instance, "Variable References, sorted by Variable name" will show you all of the Variables that are referenced throughout code and where they are referenced from. Additionally, future versions of the product will also not be able to cross reference this type of "variable = ObjectName". Total Access Analyzer 2000 and beyond work with ADPs, but DO NOT document complete XRef. We cannot currently document TSQL, which means we cannot find all references to all objects, fields, etc. However, we can and do document tables, columns, keys, triggers. HTH ------------------ Troy Troy Munford QA Manager FMS, INC Troy at fmsinc.com