Question How do I get the size of each Object? (1 Viewer)

AccessNub

Registered User.
Local time
Yesterday, 21:31
Joined
Jul 22, 2006
Messages
71
Hey all,

I have adopted someone elses database. It is a front end with about 100 linked tables/forms/reports/modules. The problem is that the database is really large. I would think by looking at the objects that it should be around 5mb tops, however after compacting it is still 63mb.

Is there a way (vba or otherwise) to look at each object and get its size in KB?

Once I can figure out which object is taking up too much space I can work on making them smaller.

TIA
 

Ranman256

Well-known member
Local time
Today, 00:31
Joined
Apr 9, 2015
Messages
4,337
63 meg is nothing.
worry about it when its 1.5 gig.
 

AccessNub

Registered User.
Local time
Yesterday, 21:31
Joined
Jul 22, 2006
Messages
71
63 meg is nothing.
worry about it when its 1.5 gig.

If the front end with no tables was 1.5GB I would delete the whole thing and start over. =)
 

jdraw

Super Moderator
Staff member
Local time
Today, 00:31
Joined
Jan 23, 2006
Messages
15,408
How do you determine when
" object is taking up too much space"?
 

Libre

been around a little
Local time
Yesterday, 21:31
Joined
May 3, 2007
Messages
660
Without exploring all the possibilities, I'll just mention that any graphics - such as a logo or any image at all, on any form or anywhere in your db can quickly double, triple, quadruple, etc, the size of your db. You can get info about the db under the menu DATABASE TOOLS / Database Documenter or DATABSE TOOLS / Analyze Performance. I don't know if these utilities will give you the sizes of individual objects though.
 
Last edited:

Galaxiom

Super Moderator
Staff member
Local time
Today, 14:31
Joined
Jan 20, 2009
Messages
12,863
The only way I have seen to find the size of objects in a database is to take a copy, remove objects one by one, compact then compare the before and after file size.

I remember seeing a VBA procedure somewhere online to do it.
 

jdraw

Super Moderator
Staff member
Local time
Today, 00:31
Joined
Jan 23, 2006
Messages
15,408
I have used this to find approximate table sizes.
As Galaxiom said -- take a copy, delete objects 1 at a time, then compact and compare the before and after file size.

I suppose you could create a new database, then import object by object and compact then compare the before and after file size after each import.

What exactly do you hope to gain from the exercise?

If you do decide to do this for all objects, and you are successful, could you please place a copy in the Code repository or the Sample databases.
 

Users who are viewing this thread

Top Bottom