Show Table Structure in Debug Window |
Post Reply |
Author | ||
Crystal Long
Microsoft MVP Joined: 21 May 2012 Location: Colorado Status: Offline Points: 35 |
Post Options
Thanks(0)
Posted: 14 Nov 2012 at 10:40pm |
|
Show Fieldnames, Data Types, Sizes, and Descriptions for Tables
this code was originally written by Duane Hookom, then modified by me to show additional information BAS module uploads/84/mod_ShowFields_Duane_Crystal_121115_BAS.zip to import a module into your database, UNZIP the attached file it to pull out the BAS file. BAS is a VBA (Visual Basic for Applications) standard (general) module. then open the database you want to document, press Alt-F11 to go to a Visual Basic window. From the menu, choose: File, Import Navigate to: mod_ShowFields_Duane_Crystal_121114.bas NEEDS reference to Microsoft DAO Object Library -OR- Microsoft Office ##.0 Access Database Engine Object Library (from the menu: Tools, References...) Debug, Compile and then Save then run the procedure at the top called RunShowFieldsForAllTables if you have too many lines for the debug window, you can document tables one at a time by changing and using RunShowFieldsForTable here is an example of the output:
here is the relevant code that prints this information:
press Ctrl-G to Goto the debuG (Immediate) window when you are in a the VBE (Visual Basic Editor). Drag it by the titlebar to move it. I like to turn the debug window on before I run the code ... and now I see I should have added PK field indicators too ... gotta stop somewhere ;) |
||
Warm Regards,
Crystal Microsoft MVP Remote Training & Programming Let's Connect and Build Together http://www.AccessMVP.com/strive4peace http://YouTube.com/LearnAccessByCrystal ~have an awesome day ~ |
||
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |