| DatabaseLessons.com |
'Serving the Microsoft® Access |
|
|
Faster Documentation for MS Access TablesBoth Access 97 and Access 2000 have a documentation generator under the menu Tools, Analyze. I use it mainly to print out a list of the fields in a table. I use these lists for a variety of things. (article continues after sponsor spot) Well, when I first used Access 2000 I found it hard to believe that this documentation feature had become so slow. A posting on a newsgroup got the, "That's the way it is." answer. So, I created my own. Much faster than the one in Access. Here is how I did it. (Access 2000 version, with DAO references turned on) Created a table (tblFields) to hold the field names and their types and sizes (ID as autonumber (primary key), TableName as text*50, FieldName as text*50, FieldType as text*20, FieldSize as integer) Created a form (frmDoc) and put 3 objects on it. (a) text box (strDBName) to type in the name of the database to document, (b) button (cmdDoc) to start the process, and (c) button (cmdExit) to exit. Put the appropriate code behind the 2 buttons. Created a report to print out the list of fields (sort on TableName and ID, group by TableName, new page after each table) Obviously, the key to this faster Access Documentation tool is in the code. Behind cmdExit DoCmd.Quit Behind cmdDoc Dim fld As Field It is left to the reader to expand this to include indexes, and/or convert to ADO. Also, add a common dialogue box feature so you can point and click on the desired database. (p.s. I will be posting a sample database with a working "Access Tables Documentation" generator in the near future. Please subscribe to the e-zine to be kept up to date on this and other news.) Happy Coding |
|
|
© 2006, 2007, 2008 Richard W. Killey. All Rights Reserved. - Privacy Policy |