PDA

View Full Version : Solved: Want summary of table sizes



TheAntiGates
09-10-2007, 09:39 AM
I'd like pre-Office'07 VBA to produce a "table" (not an "Access table") of: table names, number of records, and record length. Excel output or a text file or even Clipboard jamming would all work. The idea here is to have a compact high level look at how much data is involved, permitting management of file sizes, business management of how much data is where, quick identification of redundancies, and quick identification of wasteful allocations. Such information is beyond valuable, it's vital - which explains perfectly why Microsoft doesn't provide it (TMK). :banghead: :motz2:

Does someone have something home grown for this? Would it be difficult to roll your own? My thought would be to start with "For each tdf in tabledefs" but I'm not fluent with Access objects and I know that you folks can put this together much more efficiently than I - and, well, everyone can benefit. (Translated: please save me from doing the work, and as a bonus you get to be an altruist. :giggle )

Unfortunately I'm not using VB right now but VBA for a standalone .XLS or .MDB utility would be great. Note: Since Access limply, lamely, pathetically "touches dates," it might work out better if the .MDB is unopened, per se. (I really rely on both the O/S file dates and the internally displayed "modify dates." It's criminal how the developers get away with something so absolutely retarded.) However a snippet that I can stick in individual .MDBs would also suffice.

Thanks gratefully for someone(s)'s help.

(P.S. My next quest will be for a routine to quickly export all [Access] code - form code and report code too. Yes, I know of Documenter, but it's such a PITA...)

stanl
09-10-2007, 10:23 AM
You can pretty much do what you want with ADO and OpenSchema(), persisting to XML and parsing as needed: for tables

As for code and other modules, there are all sorts of export routines available.

As for interpretation, probably a S.W.A.G. .02 Stan

TheAntiGates
09-10-2007, 02:02 PM
Thank you for the suggestions.

I was tipped off elsewhere and scored a perfect match to what I was going for. Solvedamundo.
http://www.mrexcel.com/board2/viewtopic.php?t=233820