bas_crystal_Document_QuerySQL_FormRptRecordSource_Word_090703.txt

Document Form and Report RecordSources, and Query SQL

Document Form and Report RecordSources, and Query SQL.  Look at first 3 procedures in modules for quick launch. Import Module into Database. File, Import from VBE -- navigate to BAS file.

********************************
Here is some code to document RecordSource for all Forms and Reports. It also has an option to document all the query SQL statements.

Look at first 3 procedures in modules for quick launch.

1. Create a new standard (general) module
2. paste the code
3. make sure you have a reference to a Microsoft DAO Object Library (Tools, References...)
4. Compile (Debug, Compile)
5. fix errors (hopefully, there will be none in this code -- if you have one, you probably don't have the DAO referenced)
6. Save

Then, click in one of the first 3 procedures


    * Run_Word_CreateDocumention_SQL
    * Run_Word_CreateDocumention_Forms
    * Run_Word_CreateDocumention_Reports


and press F5 to Run!
(or choose Run, Run from the menu)
(or press ctrl-G to Goto Immediate window, paste the procedure name along with parameter(s) and press ENTER)

the procedure that does the main work is Word_CreateDocumention. Notice there is an optional parameter to make Word NOT visible while the program runs -- I like to watch it though


