Huge DB size

L

Laphan

Hi All

As some of you will know, as you've helped me out fantastically, I've been
doing an Access VBA 'app' and things have been going well until I noticed
that my app is 28MB in size!

I have:

9 Forms
5 Sub Forms
3 Tables (with a max of 4 rows in each at the mo as I'm in dev mode)
0 Queries
0 Reports
0 Macros
1 Module
Very little VBA code in each Form, say 25 lines max per form, and about 40
lines in my module

I do have a picture background in each of my forms, but because I've created
it as a JPG with a bit of compression the physical size of the file is only
52KB.

I've just done a compact/repair and the DB's size has gone down to 21MB.

If I zip it then it goes down to 3.25MB, which is what I would have thought
it would be.

Is there any reason for this? Can I decrease the DB to a more managable
size?

Thanks
 
A

Allen Browne

The form background images probably are the cause of the inflated database
size.

What version of Access is this? Any version before Access 2007 will
uncompress the image at the time you add it to your database, i.e.
internally it is stored as an uncompressed BMP, regardless of the
compression you originally used in your JPG. For compatibility with previous
versions, the behavior in A2007 depends on the Picture Property Storage
Format setting under:
Office Button | Access Options | Current Database

If you have the same image (such as a logo) on multiple forms/reports, one
approach is to place it on one form or report, and then use that as a
subform/subreport on the others. This saves storing the same image many
times in the database. Another approach is to place an image control on the
form/report, and then set its Picture property in the Load event. This lets
you keep the database as an external image, without storing it in the
database at all.

If you are using different pictures on different forms, you can still assign
the Picture of an image when the form loads.

In some versions of Access, there were memory leaks associated with the
Picture property of the form. Essentially, it did not release all the memory
when the form unloaded, so if you loaded a form with a Picture many times,
you gradually ran out of RAM.
 
T

Tony Toews [MVP]

Allen Browne said:
What version of Access is this? Any version before Access 2007 will
uncompress the image at the time you add it to your database, i.e.
internally it is stored as an uncompressed BMP, regardless of the
compression you originally used in your JPG.

BTW, and Allen knows this, this approach doesn't make a lot of sense
these days. But back in the days of 386s and 486s converting a jpg
to a screen image took a *lot* of CPU. BMP format files, while using
a lot of disk space, requires very few CPU cycles by comparison.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
C

charles

hey
Tony Toews said:
BTW, and Allen knows this, this approach doesn't make a lot of sense
these days. But back in the days of 386s and 486s converting a jpg
to a screen image took a *lot* of CPU. BMP format files, while using
a lot of disk space, requires very few CPU cycles by comparison.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
A

a a r o n . k e m p f

Tony;

stop makign excuses for your piece of shit obsolete database.

SQL Server can hold and display images JUST FINE without bloat.

-Aaron
 
F

Florin

Hi Allen,
Is there a way to compress all the images stored as bitmaps in an old Access
database?
I have a front-end designed in Access 2003 that I'm moving towards Access
2007 (I'm leaving it as .mdb/.mde though). Right now because of these images
the front-end is over 200 MB but I'm hoping to reduce it by compressing them.
Any ideas on how I can do that without working on each of them?
Many thanks!
Florin

PS: I'm a big fan of your tips page, it's a great resource
 
F

Florin

Thanks Allen, this makes sense but is there a way to do this automatically?
Since my front-end was built a while ago, I'm not sure I have all the
original images.
Which means the best way would be to export the images already embedded to
external files, which I should later on link to.
Do you know of a code that does that? I googled it but I found no answers.
Thanks again!
Florin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top