Large file size

J

JimS

I have a front-end database with NO tables (only links), half-dozen queries,
a dozen forms, and three code utility modules (all told, code is maybe 300
lines visible). It's taking up 122MB! Any idea why? Strategies?
 
R

Rick Brandt

JimS said:
I have a front-end database with NO tables (only links), half-dozen
queries, a dozen forms, and three code utility modules (all told,
code is maybe 300 lines visible). It's taking up 122MB! Any idea why?
Strategies?

Have you compacted? Do the forms utilize any images?
 
A

Allen Browne

Presumably you have already tried a compact:
Tools | Database Utilities | Compact/Repair
or in Access 2007:
Office Button | Manage | Compact/Repair

If you have any graphics in the database (e.g. Picture property of the form,
or Image controls), you could try removing those. The bloat the database
badly. (This is much less of a problem in Access 2007.) Then compact again.

If that has not solved it, decompile this database, and then import
everything into a new one:

1. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

2. Open Access (holding down the Shift key if you have any startup code),
and compact again.

3. Create a new database:
File | New

4. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
In Access 2007, it's:
Office Button | Access Options | Current Database | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

5. Link the tables:
File | Get External | Link

6. Import the queries, forms, and modules from the old database.
 
A

Allen Browne

Simplest solution is to put the image in a subreport.
Then put that subreport onto your other reports.

The advantage is that the image is present in the database once only.

The other alternative is to use an Image control, and set its Picture
property programmatically.

(Access 2007 can do this without code, since the image control has a Control
Source.)
 
Top